-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpipeline.yml
191 lines (172 loc) · 4.75 KB
/
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
resources:
- name: repo-master
type: git
source:
uri: ((repo.uri))
branch: master
private_key: ((repo.private_key))
- name: repo-develop
type: git
source:
uri: ((repo.uri))
branch: develop
private_key: ((repo.private_key))
# ignore_paths: [charts/prometheus-operator]
jobs:
- name: upgrade-and-test
serial: true
serial_groups: [install]
plan:
- get: repo
resource: repo-develop
trigger: true
- task: get-latest-chart-version
file: repo/ci/tasks/helm-search/task.yml
params:
RELEASE: ((release))
CHART_REPO: ((chart_repo))
- task: fetch-chart
file: repo/ci/tasks/helm-fetch/task.yml
params:
RELEASE: ((release))
CHART_REPO: ((chart_repo))
- task: lint-chart
file: repo/ci/tasks/helm-lint/task.yml
params:
RELEASE: ((release))
- task: login
file: repo/ci/tasks/pks-login/task.yml
params:
PKS_API_URL: ((pks_api_url))
PKS_USER: ((pks_user))
PKS_PASSWORD: ((pks_password))
CLUSTER_NAME: ((cluster_name))
- task: install-chart
file: repo/ci/tasks/install-operator/task.yml
params:
OM_TARGET: ((om_target))
OM_USERNAME: ((om_username))
OM_PASSWORD: ((om_password))
OM_SKIP_SSL_VALIDATION: ((om_skip_ssl_validation))
BOSH_UAA_CLIENT_ID: ((bosh_uaa_client_id))
BOSH_UAA_CLIENT_SECRET: ((bosh_uaa_client_secret))
PKS_API_HOSTNAME: ((pks_api_hostname))
PKS_API_MONITOR_SECRET: ((pks_api_monitor_secret))
FOUNDATION: ((foundation))
CLUSTER_NAME: ((cluster_name))
NAMESPACE: ((namespace))
RELEASE: ((release))
CANARY: true
- task: test-chart
file: repo/ci/tasks/helm-test/task.yml
params:
CANARY: true
FOUNDATION: ((foundation))
CLUSTER_NAME: ((cluster_name))
NAMESPACE: ((namespace))
RELEASE: ((release))
attempts: 3
- task: tag-and-commit
file: repo/ci/tasks/tag-and-commit/task.yml
params:
FILE_SOURCE_PATH: charts
FILE_DESTINATION_PATH: charts
GIT_AUTHOR_EMAIL: "[email protected]"
GIT_AUTHOR_NAME: "Mark Alston"
COMMIT_MESSAGE: "Update helm chart"
input_mapping:
file-source: charts-commit
tag: version
- put: repo
resource: repo-develop
params:
repository: repo-commit
merge: true
- name: rebase-develop-to-master
serial: true
serial_groups: [install]
plan:
- aggregate:
- get: repo-master
- get: repo-develop
passed: [upgrade-and-test]
- put: repo
resource: repo-master
params:
repository: repo-develop
rebase: true
- name: install-and-test
serial_groups: [install]
serial: true
plan:
- get: repo
resource: repo-master
passed: [rebase-develop-to-master]
trigger: true
- task: lint
file: repo/ci/tasks/helm-lint/task.yml
params:
RELEASE: ((release))
- task: pks-login
file: repo/ci/tasks/pks-login/task.yml
params:
PKS_API_URL: ((pks_api_url))
PKS_USER: ((pks_user))
PKS_PASSWORD: ((pks_password))
CLUSTER_NAME: ((cluster_name))
- task: install-operator
config:
platform: linux
image_resource:
type: docker-image
source:
repository: malston/pks-control-plane
# repository: harbor.haas-420.pez.pivotal.io/library/malston/pks-control-plane
# insecure_registries: [harbor.haas-420.pez.pivotal.io]
tag: 0.0.1
inputs:
- name: repo
- name: pks-config
- name: kube-config
run:
path: repo/ci/tasks/install-operator/task.sh
params:
OM_TARGET: ((om_target))
OM_USERNAME: ((om_username))
OM_PASSWORD: ((om_password))
OM_SKIP_SSL_VALIDATION: ((om_skip_ssl_validation))
BOSH_UAA_CLIENT_ID: ((bosh_uaa_client_id))
BOSH_UAA_CLIENT_SECRET: ((bosh_uaa_client_secret))
PKS_API_HOSTNAME: ((pks_api_hostname))
PKS_API_MONITOR_SECRET: ((pks_api_monitor_secret))
FOUNDATION: ((foundation))
CLUSTER_NAME: ((cluster_name))
NAMESPACE: ((namespace))
RELEASE: ((release))
CANARY: false
- task: test
file: repo/ci/tasks/helm-test/task.yml
params:
CANARY: false
FOUNDATION: ((foundation))
CLUSTER_NAME: ((cluster_name))
NAMESPACE: ((namespace))
RELEASE: ((release))
attempts: 3
- name: uninstall
serial_groups: [install]
plan:
- get: repo
resource: repo-master
- task: pks-login
file: repo/ci/tasks/pks-login/task.yml
params:
PKS_API_URL: ((pks_api_url))
PKS_USER: ((pks_user))
PKS_PASSWORD: ((pks_password))
CLUSTER_NAME: ((cluster_name))
- task: uninstall-operator
file: repo/ci/tasks/uninstall-operator/task.yml
params:
RELEASE: ((release))
NAMESPACE: ((namespace))