-
Notifications
You must be signed in to change notification settings - Fork 1
/
kickoff-offline-gen-pipeline.yml
119 lines (107 loc) · 3.63 KB
/
kickoff-offline-gen-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
jobs:
- name: offline-gen-kickoff
plan:
- aggregate:
- get: offline-gen-pipeline
- get: target-pipeline
- config:
image_resource:
source: {repository: nsxedgegen/offline-gen-worker}
type: docker-image
inputs:
- name: offline-gen-pipeline
- name: target-pipeline
outputs:
- name: offline-gen-output
platform: linux
run:
args:
- -ec
- |
echo ${OFFLINE_GEN_YAML_PARAM} > offline-gen-output/offline-gen-params.yml
echo ${PIPELINE_YAML_PARAM} > offline-gen-output/pipeline-params.yml
python offline-gen-pipeline/offline-generator.py -kickoff target-pipeline offline-gen-output/offline-gen-params.yml;
mv kickoff-*.yml offline-gen-output/
cd offline-gen-output/
for file in $(ls *params.yml)
do
file_basename=$(basename $file .yml)
mv ${file} ${file_basename}-1.0.yml
done
path: /bin/bash
task: kickoff-offline-gen
params:
OFFLINE_GEN_YAML_PARAM: ((offline_gen_yaml_input_params))
PIPELINE_YAML_PARAM: ((pipeline_yaml_input_params))
- aggregate:
- put: offline-gen-param-file
params: { file: offline-gen-output/offline-gen-params*.yml }
- put: pipeline-param-file
params: { file: offline-gen-output/pipeline-params*.yml }
- put: kickoff-offline-gen-output-pipeline
params: { file: offline-gen-output/kickoff-*.yml }
- name: start-full-generation-for-((target_pipeline_name))
plan:
- aggregate:
- get: pipeline-param-file
- get: offline-gen-param-file
- get: kickoff-offline-gen-output-pipeline
trigger: true
- put: offline-gen-full-generation-pipeline
params:
#pipelines_file: path/to/pipelines/file
pipelines:
- name: start-full-generation-for-((target_pipeline_name))-pipeline
team: ((concourse_team))
config_file: kickoff-offline-gen-output-pipeline/*.yml
vars_files:
- offline-gen-param-file/offline-gen-param*
- pipeline-param-file/pipeline-param*
resource_types:
- name: concourse-pipeline
type: docker-image
source:
repository: concourse/concourse-pipeline-resource
resources:
- name: offline-gen-full-generation-pipeline
type: concourse-pipeline
source:
insecure: "true"
teams:
- name: ((concourse_team))
username: ((concourse_username))
password: ((concourse_password))
- name: offline-gen-pipeline
type: git
source:
branch: master
uri: https://github.com/sparameswaran/offline-gen.git
- name: target-pipeline
type: git
source:
branch: ((target_pipeline_branch))
uri: ((target_pipeline_uri))
- name: offline-gen-param-file
type: s3
source:
access_key_id: ((offline_gen_s3_access_key_id))
bucket: ((offline_gen_s3_bucket))
endpoint: ((offline_gen_s3_endpoint))
secret_access_key: ((offline_gen_s3_secret_access_key))
regexp: ((offline_run_id))/resources/offline-gen/offline-gen-params-*(.*).yml
- name: pipeline-param-file
type: s3
source:
access_key_id: ((offline_gen_s3_access_key_id))
bucket: ((offline_gen_s3_bucket))
endpoint: ((offline_gen_s3_endpoint))
secret_access_key: ((offline_gen_s3_secret_access_key))
regexp: ((offline_run_id))/resources/offline-gen/pipeline-params-*(.*).yml
- name: kickoff-offline-gen-output-pipeline
type: s3
source:
access_key_id: ((offline_gen_s3_access_key_id))
bucket: ((offline_gen_s3_bucket))
endpoint: ((offline_gen_s3_endpoint))
secret_access_key: ((offline_gen_s3_secret_access_key))
regexp: ((offline_run_id))/resources/offline-gen/kickoff-*(.*).yml