This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
604 lines (511 loc) · 24 KB
/
build.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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
name: Main build
on:
workflow_dispatch:
push:
branches: [main]
env:
REGISTRY: ghcr.io
NAMESPACE: galasa-dev
BRANCH: ${{ github.ref_name }}
ARGOCD_AUTH_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
jobs:
log-github-ref:
name: Log the GitHub ref this workflow is running on (Branch or tag that received dispatch)
runs-on: ubuntu-latest
steps:
- name: Log GitHub ref of workflow
run: |
echo "This workflow is running on GitHub ref ${{ env.BRANCH }}"
build-obr:
name: Build OBR using galasabld image and maven
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
path: obr
ref: ${{ env.BRANCH }}
- name: Checkout framework
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/framework
path: framework
ref: ${{ env.BRANCH }}
- name: Checkout extensions
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/extensions
path: extensions
ref: ${{ env.BRANCH }}
- name: Checkout managers
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/managers
path: managers
ref: ${{ env.BRANCH }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'semeru'
- name: Print githash
working-directory: obr
run: |
echo $GITHUB_SHA > ./obr.githash
- name: Make secrets directory
run : |
mkdir /home/runner/work/secrets
- name: Copy settings.xml
env:
MAVEN_SETTINGS_XML: ${{ secrets.MAVEN_SETTINGS_XML }}
run : |
echo $MAVEN_SETTINGS_XML > /home/runner/work/secrets/settings.xml
- name: Copy GPG passphrase
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run : |
echo $GPG_PASSPHRASE > /home/runner/work/secrets/passphrase.file
- name: Copy GPG key
env:
GPG_KEY_BASE64: ${{ secrets.GPG_KEY }}
run : |
echo $GPG_KEY_BASE64 | base64 --decode > /home/runner/work/secrets/galasa.gpg
- name: Make GPG home directory and change permissions
run: |
mkdir /home/runner/work/gpg
chmod '700' /home/runner/work/gpg
- name: Import GPG
run: |
gpg --homedir /home/runner/work/gpg --pinentry-mode loopback --passphrase-file /home/runner/work/secrets/passphrase.file --import /home/runner/work/secrets/galasa.gpg
- name: Copy custom settings.xml
run: |
cp /home/runner/work/secrets/settings.xml /home/runner/work/gpg/settings.xml
- name: Generate Galasa BOM
run: |
docker run --rm -v ${{ github.workspace }}:/var/root/ ghcr.io/galasa-dev/galasabld-amd64:main template --releaseMetadata var/root/framework/release.yaml --releaseMetadata /var/root/extensions/release.yaml --releaseMetadata /var/root/managers/release.yaml --releaseMetadata /var/root/obr/release.yaml --template /var/root/obr/galasa-bom/pom.template --output /var/root/obr/galasa-bom/pom.xml --bom
- name: Display Galasa BOM pom.xml
run: |
cat ${{ github.workspace }}/obr/galasa-bom/pom.xml
- name: Build Galasa BOM with maven
run: |
set -o pipefail
mvn -f obr/galasa-bom/pom.xml deploy -X \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.BRANCH }}/maven-repo/managers \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:${{ github.workspace }}/obr/repo \
--batch-mode --errors --fail-at-end \
--settings /home/runner/work/gpg/settings.xml 2>&1 | tee galasa-bom-build.log
- name: Upload Galasa BOM Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: galasa-bom-build-log
path: galasa-bom-build.log
retention-days: 7
- name: Generate Galasa OBR
run: |
docker run --rm -v ${{ github.workspace }}:/var/root/ ghcr.io/galasa-dev/galasabld-amd64:main template --releaseMetadata var/root/framework/release.yaml --releaseMetadata /var/root/extensions/release.yaml --releaseMetadata /var/root/managers/release.yaml --releaseMetadata /var/root/obr/release.yaml --template /var/root/obr/dev.galasa.uber.obr/pom.template --output /var/root/obr/dev.galasa.uber.obr/pom.xml --obr
- name: Display Galasa OBR pom.xml
run: |
cat ${{ github.workspace }}/obr/dev.galasa.uber.obr/pom.xml
- name: Build Galasa OBR with maven
run: |
set -o pipefail
mvn -f obr/dev.galasa.uber.obr/pom.xml deploy -X \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.BRANCH }}/maven-repo/managers \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:${{ github.workspace }}/obr/repo \
--batch-mode --errors --fail-at-end \
--settings /home/runner/work/gpg/settings.xml 2>&1 | tee galasa-obr-build.log
- name: Upload Galasa OBR Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: galasa-obr-build-log
path: galasa-obr-build.log
retention-days: 7
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: galasa-team
password: ${{ secrets.GALASA_TEAM_WRITE_PACKAGES_TOKEN }}
- name: Extract metadata for OBR image
id: metadata-obr
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/obr-maven-artefacts
- name: Build and push OBR image
id: build-obr
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.obr
push: true
tags: ${{ steps.metadata-obr.outputs.tags }}
labels: ${{ steps.metadata-obr.outputs.labels }}
build-args: |
dockerRepository=${{ env.REGISTRY }}
tag=${{ env.BRANCH }}
- name: Recycle OBR application in ArgoCD
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app actions run ${{ env.BRANCH }}-maven-repos restart --kind Deployment --resource-name obr-${{ env.BRANCH }} --server argocd.galasa.dev
- name: Wait for OBR application health in ArgoCD
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.BRANCH }}-maven-repos --resource apps:Deployment:obr-${{ env.BRANCH }} --health --server argocd.galasa.dev
# To build an image with the Uber OBR and galasabld executable inside.
# This is needed during releases.
- name: Checkout buildutils
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/buildutils
path: buildutils
ref: ${{ env.BRANCH }}
- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build galasabld using the Makefile
working-directory: buildutils
run: |
make all
- name: Extract metadata for OBR and galasabld image
id: metadata-obr-galasabld
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/obr-and-galasabld-executable
- name: Build and push OBR and galasabld image
id: build-obr-galasabld
uses: docker/build-push-action@v5
with:
context: buildutils
file: obr/dockerfiles/dockerfile.obrgalasabld
push: true
tags: ${{ steps.metadata-obr-galasabld.outputs.tags }}
labels: ${{ steps.metadata-obr-galasabld.outputs.labels }}
build-args: |
dockerRepository=${{ env.REGISTRY }}
tag=${{ env.BRANCH }}
platform=linux-amd64
build-obr-javadocs:
name: Build OBR javadocs using galasabld image and maven
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
path: obr
ref: ${{ env.BRANCH }}
- name: Checkout framework
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/framework
path: framework
ref: ${{ env.BRANCH }}
- name: Checkout extensions
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/extensions
path: extensions
ref: ${{ env.BRANCH }}
- name: Checkout managers
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/managers
path: managers
ref: ${{ env.BRANCH }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'semeru'
- name: Make secrets directory
run : |
mkdir /home/runner/work/secrets
- name: Copy settings.xml
env:
MAVEN_SETTINGS_XML: ${{ secrets.MAVEN_SETTINGS_XML }}
run : |
echo $MAVEN_SETTINGS_XML > /home/runner/work/secrets/settings.xml
- name: Copy GPG passphrase
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run : |
echo $GPG_PASSPHRASE > /home/runner/work/secrets/passphrase.file
- name: Copy GPG key
env:
GPG_KEY_BASE64: ${{ secrets.GPG_KEY }}
run : |
echo $GPG_KEY_BASE64 | base64 --decode > /home/runner/work/secrets/galasa.gpg
- name: Make GPG home directory and change permissions
run: |
mkdir /home/runner/work/gpg
chmod '700' /home/runner/work/gpg
- name: Import GPG
run: |
gpg --homedir /home/runner/work/gpg --pinentry-mode loopback --passphrase-file /home/runner/work/secrets/passphrase.file --import /home/runner/work/secrets/galasa.gpg
- name: Copy custom settings.xml
run: |
cp /home/runner/work/secrets/settings.xml /home/runner/work/gpg/settings.xml
- name: Build Galasa Javadoc
run: |
docker run --rm -v ${{ github.workspace }}:/var/root/ ghcr.io/galasa-dev/galasabld-amd64:main template --releaseMetadata var/root/framework/release.yaml --releaseMetadata /var/root/extensions/release.yaml --releaseMetadata /var/root/managers/release.yaml --releaseMetadata /var/root/obr/release.yaml --template /var/root/obr/javadocs/pom.template --output /var/root/obr/javadocs/pom.xml --javadoc
- name: Display Galasa Javadoc pom.xml
run: |
cat ${{ github.workspace }}/obr/javadocs/pom.xml
- name: Build javadoc site using maven
run: |
set -o pipefail
mvn -f obr/javadocs/pom.xml deploy -X \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.BRANCH }}/maven-repo/managers \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:${{ github.workspace }}/obr/javadocs/docker/repo \
-Dmaven.javadoc.failOnError=false \
--batch-mode --errors --fail-at-end \
--settings /home/runner/work/gpg/settings.xml 2>&1 | tee build.log
- name: Upload javadoc site Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: javadoc-site-build-log
path: build.log
retention-days: 7
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: galasa-team
password: ${{ secrets.GALASA_TEAM_WRITE_PACKAGES_TOKEN }}
- name: Extract metadata for Javadoc site image
id: metadata-javadoc-site
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/javadoc-site
- name: Build and push Javadoc site image
id: build-javadoc-site
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.javadocsite
push: true
tags: ${{ steps.metadata-javadoc-site.outputs.tags }}
labels: ${{ steps.metadata-javadoc-site.outputs.labels }}
- name: Recycle javadocsite application in ArgoCD
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app actions run ${{ env.BRANCH }}-maven-repos restart --kind Deployment --resource-name javadocsite-${{ env.BRANCH }} --server argocd.galasa.dev
- name: Wait for javadocsite application health in ArgoCD
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.BRANCH }}-maven-repos --resource apps:Deployment:javadocsite-${{ env.BRANCH }} --health --server argocd.galasa.dev
- name: Extract metadata for Javadoc Maven repo image
id: metadata
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/javadoc-maven-artefacts
- name: Build and push Javadoc Maven repo image
id: build
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.javadocmavenrepo
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
dockerRepository=${{ env.REGISTRY }}
baseVersion=latest
- name: Recycle javadoc application in ArgoCD
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app actions run ${{ env.BRANCH }}-maven-repos restart --kind Deployment --resource-name javadoc-${{ env.BRANCH }} --server argocd.galasa.dev
- name: Wait for javadoc application health in ArgoCD
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.BRANCH }}-maven-repos --resource apps:Deployment:javadoc-${{ env.BRANCH }} --health --server argocd.galasa.dev
build-obr-generic:
name: Build OBR embedded and boot images using galasabld and maven
runs-on: ubuntu-latest
needs: [build-obr, build-obr-javadocs]
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
path: obr
ref: ${{ env.BRANCH }}
- name: Checkout framework
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/framework
path: framework
ref: ${{ env.BRANCH }}
- name: Checkout extensions
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/extensions
path: extensions
ref: ${{ env.BRANCH }}
- name: Checkout managers
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/managers
path: managers
ref: ${{ env.BRANCH }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'semeru'
- name: Make secrets directory
run : |
mkdir /home/runner/work/secrets
- name: Copy settings.xml
env:
MAVEN_SETTINGS_XML: ${{ secrets.MAVEN_SETTINGS_XML }}
run : |
echo $MAVEN_SETTINGS_XML > /home/runner/work/secrets/settings.xml
- name: Copy GPG passphrase
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run : |
echo $GPG_PASSPHRASE > /home/runner/work/secrets/passphrase.file
- name: Copy GPG key
env:
GPG_KEY_BASE64: ${{ secrets.GPG_KEY }}
run : |
echo $GPG_KEY_BASE64 | base64 --decode > /home/runner/work/secrets/galasa.gpg
- name: Make GPG home directory and change permissions
run: |
mkdir /home/runner/work/gpg
chmod '700' /home/runner/work/gpg
- name: Import GPG
run: |
gpg --homedir /home/runner/work/gpg --pinentry-mode loopback --passphrase-file /home/runner/work/secrets/passphrase.file --import /home/runner/work/secrets/galasa.gpg
- name: Copy custom settings.xml
run: |
cp /home/runner/work/secrets/settings.xml /home/runner/work/gpg/settings.xml
- name: Generate Galasa OBR generic pom.xml
run: |
docker run --rm -v ${{ github.workspace }}:/var/root/ ghcr.io/galasa-dev/galasabld-amd64:main template --releaseMetadata var/root/framework/release.yaml --releaseMetadata /var/root/extensions/release.yaml --releaseMetadata /var/root/managers/release.yaml --releaseMetadata /var/root/obr/release.yaml --template /var/root/obr/obr-generic/pom.template --output /var/root/obr/obr-generic/pom.xml --obr
- name: Display Galasa OBR generic pom.xml
run: |
cat ${{ github.workspace }}/obr/obr-generic/pom.xml
- name: Build Galasa OBR generic pom.xml with maven
working-directory: ${{ github.workspace }}/obr/obr-generic
run: |
set -o pipefail
mvn -f pom.xml process-sources -X \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.BRANCH }}/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
dev.galasa:galasa-maven-plugin:0.15.0:obrembedded \
--batch-mode --errors --fail-at-end \
--settings /home/runner/work/gpg/settings.xml 2>&1 | tee build.log
- name: Upload galasa obr generic Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: galasa-obr-generic-build-log
path: build.log
retention-days: 7
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: galasa-team
password: ${{ secrets.GALASA_TEAM_WRITE_PACKAGES_TOKEN }}
- name: Extract metadata for OBR generic image
id: metadata-obr-generic
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/obr-generic
- name: Build and push obr-generic
id: build-obr-generic
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.obrgeneric
push: true
tags: ${{ steps.metadata-obr-generic.outputs.tags }}
labels: ${{ steps.metadata-obr-generic.outputs.labels }}
- name: Copy files from kubectl image for Galasa boot embedded images
run: |
mkdir -p /opt/k8s/bin
curl -L https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl -o /opt/k8s/bin/kubectl
chmod +x /opt/k8s/bin/kubectl
cp -vr /opt/k8s/bin/kubectl ${{ github.workspace }}/obr/dockerfiles/trace-log4j.properties ${{ github.workspace }}/obr/obr-generic/
- name: Extract metadata for Galasa boot embedded image
id: metadata-boot-embedded
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/galasa-boot-embedded-x86_64
- name: Build and push Galasa boot embedded image
id: build-boot-embedded
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.bootembedded
push: true
tags: ${{ steps.metadata-boot-embedded.outputs.tags }}
labels: ${{ steps.metadata-boot-embedded.outputs.labels }}
build-args: |
tag=${{ env.BRANCH }}
dockerRepository=${{ env.REGISTRY }}
jdkImage=harbor.galasa.dev/docker_proxy_cache/library/openjdk:17
- name: Extract metadata for Galasa IBM boot embedded image
id: metadata-ibm-boot-embedded
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/galasa-ibm-boot-embedded-x86_64
- name: Build and push Galasa IBM boot embedded image
id: build-ibm-boot-embedded
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.ibmbootembedded
push: true
tags: ${{ steps.metadata-ibm-boot-embedded.outputs.tags }}
labels: ${{ steps.metadata-ibm-boot-embedded.outputs.labels }}
build-args: |
tag=${{ env.BRANCH }}
dockerRepository=${{ env.REGISTRY }}
platform=x86_64
trigger-next-workflows:
name: Trigger next workflows in the build chain
needs: [build-obr, build-obr-generic, build-obr-javadocs]
runs-on: ubuntu-latest
steps:
- name: Triggering helm build (github.ref is main)
if: ${{ env.BRANCH == 'main' }}
env:
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
run: |
gh workflow run build-helm.yaml --repo https://github.com/galasa-dev/automation --ref ${{ env.BRANCH }}
- name: Triggering integratedtests build (github.ref is main)
if: ${{ env.BRANCH == 'main' }}
env:
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
run: |
gh workflow run build.yaml --repo https://github.com/galasa-dev/integratedtests --ref ${{ env.BRANCH }}
- name: Triggering cli build (github.ref is not main)
if: ${{ env.BRANCH != 'main' }}
env:
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
run: |
gh workflow run build.yml --repo https://github.com/galasa-dev/cli --ref ${{ env.BRANCH }}
- name: Triggering simplatform build
env:
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
run: |
gh workflow run build.yaml --repo https://github.com/galasa-dev/simplatform --ref ${{ env.BRANCH }}
report-failure:
name: Report failure in workflow
runs-on: ubuntu-latest
needs: [log-github-ref, build-obr, build-obr-javadocs, build-obr-generic, trigger-next-workflows]
if: failure()
steps:
- name: Report failure in workflow to Slack
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run : |
docker run --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/galasabld-ibm:main slackpost workflows --repo "obr" --workflowName "${{ github.workflow }}" --workflowRunNum "${{ github.run_id }}" --ref "${{ env.BRANCH }}" --hook "${{ env.SLACK_WEBHOOK }}"