Skip to content

Commit 32c7eea

Browse files
authored
ci: inline pipeline workflow (ADR 004) (#117)
Inline pipeline orchestration per ADR 004 while keeping shared job-* workflow references. - Replace delegating pipe job with inlined job orchestration - Add quality-gate aggregator job - Split auto-labeler into separate workflow On-behalf-of: @SAP <bastian.echterhoelter@sap.com> Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>
1 parent ab62fae commit 32c7eea

2 files changed

Lines changed: 103 additions & 7 deletions

File tree

.github/workflows/auto-labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: auto-labeler
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
issues: write
13+
14+
jobs:
15+
auto-labeler:
16+
if: github.event.pull_request.head.repo.full_name == github.repository
17+
uses: platform-mesh/.github/.github/workflows/job-auto-labeler.yml@main

.github/workflows/pipeline.yml

Lines changed: 86 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: ci
2+
23
on:
34
push:
45
branches:
@@ -10,19 +11,97 @@ on:
1011

1112
permissions:
1213
contents: write
14+
id-token: write
15+
issues: write
1316
packages: write
1417
pull-requests: write
1518

19+
concurrency:
20+
group: ${{ github.ref }}
21+
cancel-in-progress: true
22+
1623
jobs:
17-
pipe:
18-
concurrency:
19-
group: ${{ github.ref }}
20-
cancel-in-progress: true
21-
uses: platform-mesh/.github/.github/workflows/pipeline-golang-app.yml@main
24+
lint:
25+
uses: platform-mesh/.github/.github/workflows/job-golang-lint.yml@main
26+
with:
27+
useMake: true
28+
29+
test:
30+
uses: platform-mesh/.github/.github/workflows/job-golang-test-source.yml@main
2231
secrets: inherit
2332
with:
24-
imageTagName: ghcr.io/platform-mesh/example-httpbin-operator
25-
repoVersionUpdate: platform-mesh/helm-charts
2633
useMake: true
2734
useLocalCoverageConfig: true
2835

36+
docker-build:
37+
if: github.event_name == 'pull_request'
38+
uses: platform-mesh/.github/.github/workflows/job-docker-build-push.yml@main
39+
with:
40+
imageTagName: ghcr.io/platform-mesh/example-httpbin-operator
41+
secrets: inherit
42+
43+
quality-gate:
44+
if: always()
45+
permissions: {}
46+
needs: [lint, test, docker-build]
47+
runs-on: ubuntu-latest
48+
timeout-minutes: 1
49+
steps:
50+
- name: Check results
51+
run: |
52+
if [[ "${{ needs.lint.result }}" != "success" ]]; then
53+
echo "lint failed"
54+
exit 1
55+
fi
56+
if [[ "${{ needs.test.result }}" != "success" ]]; then
57+
echo "test failed"
58+
exit 1
59+
fi
60+
# docker-build is skipped on main pushes — allow skipped
61+
if [[ "${{ needs.docker-build.result }}" != "success" && "${{ needs.docker-build.result }}" != "skipped" ]]; then
62+
echo "docker-build failed"
63+
exit 1
64+
fi
65+
66+
create-version:
67+
if: github.ref == 'refs/heads/main'
68+
uses: platform-mesh/.github/.github/workflows/job-create-version.yml@main
69+
secrets: inherit
70+
71+
docker-build-push:
72+
if: github.ref == 'refs/heads/main'
73+
needs: [create-version, lint, test]
74+
uses: platform-mesh/.github/.github/workflows/job-docker-build-push.yml@main
75+
with:
76+
imageTagName: ghcr.io/platform-mesh/example-httpbin-operator
77+
version: ${{ needs.create-version.outputs.version }}
78+
multiarch: true
79+
secrets: inherit
80+
81+
update-version:
82+
if: github.ref == 'refs/heads/main'
83+
needs: [create-version, docker-build-push]
84+
uses: platform-mesh/.github/.github/workflows/job-chart-version-update.yml@main
85+
secrets: inherit
86+
with:
87+
appVersion: ${{ needs.create-version.outputs.version }}
88+
chart: example-httpbin-operator
89+
targetRepository: platform-mesh/helm-charts
90+
91+
sbom:
92+
if: github.ref == 'refs/heads/main'
93+
needs: [create-version, docker-build-push]
94+
uses: platform-mesh/.github/.github/workflows/job-sbom.yml@main
95+
with:
96+
imageReference: ghcr.io/platform-mesh/example-httpbin-operator:${{ needs.create-version.outputs.version }}
97+
98+
image-ocm:
99+
if: github.ref == 'refs/heads/main'
100+
needs: [create-version, docker-build-push, sbom]
101+
uses: platform-mesh/.github/.github/workflows/job-image-ocm.yml@main
102+
secrets: inherit
103+
with:
104+
imageReference: ghcr.io/platform-mesh/example-httpbin-operator:${{ needs.create-version.outputs.version }}
105+
appVersion: ${{ needs.create-version.outputs.version }}
106+
repoName: example-httpbin-operator
107+
commit: ${{ github.sha }}

0 commit comments

Comments
 (0)