Skip to content

Commit 18aca1e

Browse files
committed
CASMINST-6279: redesign build-sign-scan action
1 parent af9f813 commit 18aca1e

9 files changed

Lines changed: 871 additions & 258 deletions

File tree

.github/workflows/build-sign-scan.yaml

Lines changed: 470 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
#
2+
# MIT License
3+
#
4+
# (C) Copyright 2025 Hewlett Packard Enterprise Development LP
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a
7+
# copy of this software and associated documentation files (the "Software"),
8+
# to deal in the Software without restriction, including without limitation
9+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
10+
# and/or sell copies of the Software, and to permit persons to whom the
11+
# Software is furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included
14+
# in all copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
# OTHER DEALINGS IN THE SOFTWARE.
23+
#
24+
name: Test build-sign-scan reusable workflow
25+
26+
on:
27+
push:
28+
paths:
29+
- .github/workflows/test-build-sign-scan.yaml
30+
- build-sign-scan/**
31+
workflow_dispatch:
32+
33+
jobs:
34+
test-docker-build-local:
35+
uses: ./.github/workflows/build-sign-scan.yaml
36+
with:
37+
context_path: build-sign-scan/tests/alpine
38+
docker_tag: artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-local-1
39+
docker_additional_tags: |
40+
artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-local-2
41+
docker_push: false
42+
snyk: false
43+
sign: false
44+
45+
test-docker-build-single-platform:
46+
uses: ./.github/workflows/build-sign-scan.yaml
47+
with:
48+
context_path: build-sign-scan/tests/alpine
49+
docker_tag: artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-single-platform-1
50+
docker_additional_tags: |
51+
artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-single-platform-2
52+
snyk: false
53+
sign: false
54+
secrets: inherit
55+
56+
test-docker-build-multi-platform:
57+
uses: ./.github/workflows/build-sign-scan.yaml
58+
with:
59+
context_path: build-sign-scan/tests/alpine
60+
docker_tag: artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-multi-platform-1
61+
docker_build_platforms: linux/amd64,linux/arm64
62+
docker_additional_tags: |
63+
artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-multi-platform-2
64+
snyk: false
65+
sign: false
66+
secrets: inherit
67+
68+
test-docker-build-secrets:
69+
uses: ./.github/workflows/build-sign-scan.yaml
70+
with:
71+
context_path: build-sign-scan/tests/sles
72+
docker_tag: artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-secrets-1
73+
docker_build_platforms: linux/amd64,linux/arm64
74+
docker_additional_tags: |
75+
artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-docker-build-secrets-2
76+
snyk: false
77+
sign: false
78+
secrets:
79+
docker_username: ${{ secrets.ARTIFACTORY_ALGOL60_USERNAME }}
80+
docker_password: ${{ secrets.ARTIFACTORY_ALGOL60_TOKEN }}
81+
docker_secrets: |
82+
SLES_REPO_USERNAME=${{ secrets.ARTIFACTORY_ALGOL60_READONLY_USERNAME }}
83+
SLES_REPO_PASSWORD=${{ secrets.ARTIFACTORY_ALGOL60_READONLY_TOKEN }}
84+
gcp_workload_identity_provider: ${{ secrets.COSIGN_GCP_WORKLOAD_IDENTITY_PROVIDER_RSA }}
85+
gcp_service_account: ${{ secrets.COSIGN_GCP_SERVICE_ACCOUNT_RSA }}
86+
gcp_cosign_key: ${{ secrets.COSIGN_KEY_RSA }}
87+
snyk_token: ${{ secrets.SNYK_TOKEN }}
88+
89+
test-docker-build-google:
90+
uses: ./.github/workflows/build-sign-scan.yaml
91+
with:
92+
context_path: build-sign-scan/tests/alpine
93+
docker_login: false
94+
docker_oidc: true
95+
docker_tag: us-docker.pkg.dev/hpe-stage-csm-release/csm-docker/unstable/test-build-sign-scan:test-docker-build-google-1
96+
docker_build_platforms: linux/amd64,linux/arm64
97+
docker_additional_tags: |
98+
us-docker.pkg.dev/hpe-stage-csm-release/csm-docker/unstable/test-build-sign-scan:test-docker-build-google-2
99+
snyk: false
100+
sign: false
101+
secrets: inherit
102+
103+
test-makefile-local:
104+
uses: ./.github/workflows/build-sign-scan.yaml
105+
with:
106+
context_path: build-sign-scan/tests/alpine
107+
make_target: local
108+
docker_login: false
109+
env: |
110+
VERSION=test-makefile-local-1
111+
docker_additional_tags: |
112+
artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-makefile-local-2
113+
snyk: false
114+
sign: false
115+
116+
test-makefile-single-platform:
117+
uses: ./.github/workflows/build-sign-scan.yaml
118+
with:
119+
context_path: build-sign-scan/tests/alpine
120+
make_target: unstable
121+
env: |
122+
VERSION=test-makefile-single-platform-1
123+
docker_additional_tags: |
124+
artifactory.algol60.net/csm-docker-backup/unstable/test-build-sign-scan:test-makefile-single-platform-2
125+
snyk: false
126+
sign: false
127+
secrets: inherit
128+
129+
review:
130+
runs-on: ubuntu-latest
131+
132+
permissions:
133+
contents: 'read'
134+
id-token: 'write'
135+
136+
needs:
137+
- test-docker-build-local
138+
- test-docker-build-single-platform
139+
- test-docker-build-multi-platform
140+
- test-docker-build-google
141+
- test-makefile-local
142+
- test-makefile-single-platform
143+
144+
steps:
145+
- name: Dump needs context
146+
env:
147+
NEEDS_CONTEXT: ${{ toJSON(needs) }}
148+
run: |
149+
echo "$NEEDS_CONTEXT" > outputs.json

0 commit comments

Comments
 (0)