-
Notifications
You must be signed in to change notification settings - Fork 6
267 lines (248 loc) · 10 KB
/
build-release.yaml
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# Copyright 2023 Airbus
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Release Build Pipeline production-common
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+"
env:
IMAGE_NAME: rs-core
RS_CORE_FOLDER: processing-common
RS_EXAMPLES_FOLDER: rs-core-examples
ARTIFACTORY_BASE: artifactory.coprs.esa-copernicus.eu
ARTIFACTORY_PROJECT_DOCKER: rs-docker
ARTIFACTORY_PROJECT_DOCKER_PRIVATE: rs-docker-private
ARTIFACTORY_PROJECT_MAVEN: rs-maven
ARTIFACTORY_PROJECT_HELM: rs-helm
ARTIFACTORY_PROJECT_COMMON: rs-zip
ARTIFACTORY_CORE_PROJECT: rs-core
ARTIFACTORY_EXAMPLES_PROJECT: rs-core-examples
jobs:
# Git Guardian Token is invalid
# gg-scan:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: GitGuardian scan
# uses: GitGuardian/ggshield-action@master
# env:
# GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
# GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
# GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
# GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
# GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
build-base:
# Git Guardian Token is invalid
#needs: [gg-scan]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: ./.github/actions/build-container
with:
IMAGE_NAME_SUFFIX: base
BUILD_CONTEXT: ./rs-container/docker_base
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
- uses: ./.github/actions/generate-report
with:
COMPONENT: base
deploy-parent-poms:
# Git Guardian Token is invalid
#needs: [gg-scan]
runs-on: ubuntu-latest
strategy:
matrix:
pom: [rs-libs, rs-core]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/deploy-pom
with:
POM: ${{ matrix.pom }}
ARTIFACTORY_BASE: ${{ env.ARTIFACTORY_BASE}}
ARTIFACTORY_PROJECT: ${{ env.ARTIFACTORY_PROJECT_MAVEN}}
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
build-libs:
# Git Guardian Token is invalid
#needs: [gg-scan]
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
component: [lib-commons, app-status, message-adapter, xml-tools, error-repo-client, obs-sdk, metadata-client, prip-client, auxip-client, xbip-client, edip-client, cadip-client, data-lifecycle-client, jacoco-report]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-libs
with:
COMPONENT: ${{ matrix.component }}
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }}
SONARQUBE_TOKEN: ${{ secrets.WERUM_SONARQUBE_TOKEN }}
build-all-core:
needs: [build-base, build-libs]
strategy:
fail-fast: false
matrix:
component: [compression-worker, distribution-worker, dlq-manager, eviction-management-worker, execution-worker, ingestion-filter, ingestion-trigger, ingestion-worker, metadata-catalog-extraction, metadata-catalog-searchcontroller, native-api, data-lifecycle-worker, prip-frontend, ddip-frontend, preparation-worker, request-parking-lot, cronbased-trigger]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-docker
with:
COMPONENT: ${{ matrix.component }}
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }}
SONARQUBE_TOKEN: ${{ secrets.WERUM_SONARQUBE_TOKEN }}
- uses: ./.github/actions/generate-report
with:
COMPONENT: ${{ matrix.component }}
build-core-components:
# Git Guardian Token is invalid
#needs: [gg-scan]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component: [ingestion, metadata, compression, distribution, datalifecycle, dlq]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-core-components
with:
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
build-core-examples:
# Git Guardian Token is invalid
#needs: [gg-scan]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component: [ingestion-auxip, ingestion-edip, ingestion-xbip, ingestion-mock-auxip, ingestion-contingency]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-core-examples
with:
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
helm-charts:
# Git Guardian Token is invalid
#needs: [gg-scan]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component: [ddip_frontend, metadata_search_controller, native_api, prip_frontend, request_parking_lot, eviction_manager]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/helm-charts
with:
COMPONENT: ${{ matrix.component}}
CHART_FOLDER: rs-processing-common
ARTIFACTORY_HELM_PROJECT: processing
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
helm-mocks:
# Git Guardian Token is invalid
#needs: [gg-scan]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component: [mock_webdav, mock_ftp]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/helm-charts
with:
COMPONENT: ${{ matrix.component}}
CHART_FOLDER: rs-testing
ARTIFACTORY_HELM_PROJECT: testing
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
build-containers:
# Git Guardian Token is invalid
needs: [build-base]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component: [mock_webdav, mock_ftpserver]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: ./.github/actions/build-container
with:
IMAGE_NAME_SUFFIX: ${{ matrix.component }}
BUILD_CONTEXT: ./rs-container/docker_${{ matrix.component }}
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
- uses: ./.github/actions/generate-report
with:
COMPONENT: ${{ matrix.component }}
build-ipf-containers:
needs: [build-all-core]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ipf:
[
{ image: rs-ipf-s1-aio, dir: docker_s1_ipf_aio },
{ image: rs-ipf-s1-asp, dir: docker_s1_ipf_asp },
{ image: rs-ipf-s1-l1, dir: docker_s1_ipf_l1 },
{ image: rs-ipf-s1-l2, dir: docker_s1_ipf_l2 },
{ image: rs-ipf-s3-acq, dir: docker_s3_ipf_acq },
{ image: rs-ipf-s3-l0, dir: docker_s3_ipf_l0 },
{ image: rs-ipf-s3-mw1, dir: docker_s3_ipf_mw1 },
{ image: rs-ipf-s3-ol1-rac, dir: docker_s3_ipf_ol1_rac },
{ image: rs-ipf-s3-ol1-spc, dir: docker_s3_ipf_ol1_spc },
{ image: rs-ipf-s3-ol1, dir: docker_s3_ipf_ol1 },
{ image: rs-ipf-s3-ol2, dir: docker_s3_ipf_ol2 },
{ image: rs-ipf-s3-pug, dir: docker_s3_ipf_pug },
{ image: rs-ipf-s3-sl1, dir: docker_s3_ipf_sl1 },
{ image: rs-ipf-s3-sl2-frp, dir: docker_s3_ipf_sl2_frp },
{ image: rs-ipf-s3-sl2, dir: docker_s3_ipf_sl2 },
{ image: rs-ipf-s3-sr1, dir: docker_s3_ipf_sr1 },
{ image: rs-ipf-s3-sy2-aod, dir: docker_s3_ipf_sy2_aod },
{ image: rs-ipf-s3-sy2-vgs, dir: docker_s3_ipf_sy2_vgs },
{ image: rs-ipf-s3-sy2, dir: docker_s3_ipf_sy2 },
]
# The delivered IPFs for SM2 are currently too big for the GitHub pipeline, therefore skip these processors.
# If the size is fixed enable them by adding the following lines back to the array above:
# { image: rs-ipf-s3-sm2-hy, dir: docker_s3_ipf_sm2_hy },
# { image: rs-ipf-s3-sm2-li, dir: docker_s3_ipf_sm2_li },
# { image: rs-ipf-s3-sm2-si, dir: docker_s3_ipf_sm2_si },
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF} | cut -d / -f3-)"
id: extract_branch
- uses: ./.github/actions/build-ipf-container
with:
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
IMAGE_NAME: ${{ matrix.ipf.image }}
BUILD_CONTEXT: ./rs-container/${{ matrix.ipf.dir }}
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }}
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }}
- uses: ./.github/actions/generate-report
with:
COMPONENT: ${{ matrix.ipf.image }}