Repository navigation
268 lines (243 loc) · 9.64 KB
/
Copy pathrelease-qualification.yml
File metadata and controls
268 lines (243 loc) · 9.64 KB
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
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: Release Qualification
on:
workflow_call:
inputs:
release-tag:
description: Release tag identifying the candidate
required: true
type: string
source-sha:
description: Source commit of the candidate artifacts in the calling run
required: true
type: string
is-prerelease:
description: Whether the candidate is a pre-release
required: true
type: boolean
secrets:
CODEX_SECURITY_API_KEY:
required: true
CACHIX_AUTH_TOKEN:
required: false
permissions:
contents: read
packages: read
env:
RELEASE_TAG: ${{ inputs.release-tag }}
defaults:
run:
shell: bash
jobs:
security:
name: Security Scan
permissions:
actions: read
contents: read
packages: read
security-events: write
uses: ./.github/workflows/security-scan.yml
with:
candidate_ref: ${{ inputs.release-tag }}
fail-on-static-findings: false
images: |
ghcr.io/nvidia/openshell/gateway:${{ inputs.source-sha }}
ghcr.io/nvidia/openshell/sandbox:${{ inputs.source-sha }}
ghcr.io/nvidia/openshell/supervisor:${{ inputs.source-sha }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
prepare-integration:
permissions:
actions: read
contents: read
packages: read
uses: ./.github/workflows/prepare-integration-inputs.yml
with:
source-sha: ${{ inputs.source-sha }}
deb-artifact-name: deb-linux-amd64
rpm-artifact-name: rpm-linux-x86_64
conformance-integration:
needs: prepare-integration
permissions:
actions: read
contents: read
packages: read
uses: ./.github/workflows/integration-runner.yml
with:
category: conformance
source-sha: ${{ needs.prepare-integration.outputs.source_sha }}
integration-inputs-artifact-id: ${{ needs.prepare-integration.outputs.integration_inputs_artifact_id }}
test-matrix: >-
[
{"environment":"ubuntu-docker-rootful","installer":"deb","testsuite":"conformance"},
{"environment":"ubuntu-k3s","installer":"k3s","testsuite":"conformance"},
{"environment":"ubuntu-k3s","installer":"k3s-ha","testsuite":"conformance"},
{"environment":"fedora-podman-rootful","installer":"rpm","testsuite":"conformance"},
{"environment":"fedora-podman-rootless","installer":"rpm","testsuite":"conformance"}
]
feature-specific-integration:
needs: prepare-integration
permissions:
actions: read
contents: read
packages: read
uses: ./.github/workflows/integration-runner.yml
with:
category: feature-specific
source-sha: ${{ needs.prepare-integration.outputs.source_sha }}
integration-inputs-artifact-id: ${{ needs.prepare-integration.outputs.integration_inputs_artifact_id }}
test-matrix: >-
[
{"environment":"fedora-podman-rootful","installer":"rpm","testsuite":"provider-refresh"},
{"environment":"fedora-podman-rootless","installer":"rpm","testsuite":"provider-refresh"},
{"environment":"ubuntu-docker-rootful","installer":"deb","testsuite":"oci-image"},
{"environment":"fedora-podman-rootful","installer":"rpm","testsuite":"oci-image"},
{"environment":"fedora-podman-rootless","installer":"rpm","testsuite":"oci-image"}
]
docker-e2e:
permissions:
actions: read
contents: read
packages: read
uses: ./.github/workflows/e2e-docker-test.yml
with:
image-tag: ${{ inputs.source-sha }}
checkout-ref: ${{ inputs.source-sha }}
runner: linux-arm64-cpu8
vm-e2e:
permissions:
actions: read
contents: read
packages: read
uses: ./.github/workflows/e2e-vm-test.yml
with:
checkout-ref: ${{ inputs.source-sha }}
protobuf-compatibility:
name: Protobuf Compatibility
runs-on: linux-amd64-cpu8
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ inputs.source-sha }}
- uses: ./.github/actions/check-protobuf-compatibility
with:
ref: refs/tags/${{ env.RELEASE_TAG }}
compatibility-review:
name: Compatibility Review (advisory)
permissions:
contents: read
pull-requests: read
uses: ./.github/workflows/codex-compatibility.yml
with:
candidate_ref: ${{ inputs.release-tag }}
source_sha: ${{ inputs.source-sha }}
secrets:
CODEX_SECURITY_API_KEY: ${{ secrets.CODEX_SECURITY_API_KEY }}
qualification-result:
name: Release Qualification
if: always()
needs:
- protobuf-compatibility
- security
- conformance-integration
- feature-specific-integration
- docker-e2e
- vm-e2e
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ inputs.source-sha }}
- name: Record qualification result
id: summary
env:
CONFORMANCE_RESULT: ${{ needs.conformance-integration.result }}
DOCKER_E2E_RESULT: ${{ needs.docker-e2e.result }}
FEATURE_INTEGRATION_RESULT: ${{ needs.feature-specific-integration.result }}
IS_PRERELEASE: ${{ inputs.is-prerelease }}
PROTO_COMPATIBILITY_RESULT: ${{ needs.protobuf-compatibility.result }}
SECURITY_RESULT: ${{ needs.security.result }}
SOURCE_SHA: ${{ inputs.source-sha }}
VM_E2E_RESULT: ${{ needs.vm-e2e.result }}
run: |
set -euo pipefail
current_profile_passed=$(tasks/scripts/generate-qualification-summary.sh qualification-summary.json)
artifact_name="qualification-${RELEASE_TAG}-run-${GITHUB_RUN_ID}-attempt-${GITHUB_RUN_ATTEMPT}"
run_url=$(jq -r '.run.url' qualification-summary.json)
{
echo "artifact-name=${artifact_name}"
echo "current-profile-passed=${current_profile_passed}"
} >> "${GITHUB_OUTPUT}"
{
echo "## Release qualification"
echo
echo "- Candidate: \`${RELEASE_TAG}\` (\`${SOURCE_SHA}\`)"
echo "- Current qualification profile passed: **${current_profile_passed}**"
echo "- RFC-0014 qualification coverage complete: **false**"
echo "- Run: [${GITHUB_RUN_ID}, attempt ${GITHUB_RUN_ATTEMPT}](${run_url})"
echo
echo "| Suite | Result |"
echo "| --- | --- |"
echo "| Protobuf API compatibility | ${PROTO_COMPATIBILITY_RESULT} |"
echo "| Security | ${SECURITY_RESULT} |"
echo "| Conformance integration | ${CONFORMANCE_RESULT} |"
echo "| Feature integration | ${FEATURE_INTEGRATION_RESULT} |"
echo "| Docker E2E | ${DOCKER_E2E_RESULT} |"
echo "| VM E2E | ${VM_E2E_RESULT} |"
echo
echo "Advisory compatibility findings do not affect the qualification result."
echo "See the Compatibility Review job and compatibility-review-run-${GITHUB_RUN_ID}-attempt-${GITHUB_RUN_ATTEMPT} artifact in [this run](${run_url})."
} >> "${GITHUB_STEP_SUMMARY}"
- name: Upload qualification result
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ${{ steps.summary.outputs.artifact-name }}
path: qualification-summary.json
retention-days: 90
if-no-files-found: error
- name: Install ORAS
id: oras
continue-on-error: true
timeout-minutes: 1
uses: oras-project/setup-oras@1d808f7d7f6995cc68b7bf507bfe5c5446e1dc9d # v2.0.0
- name: Log in to GHCR
id: ghcr
if: steps.oras.outcome == 'success'
continue-on-error: true
timeout-minutes: 1
run: echo "${{ secrets.GITHUB_TOKEN }}" | oras login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
- name: Publish qualification summary
id: oci
if: steps.ghcr.outcome == 'success'
continue-on-error: true
timeout-minutes: 1
env:
SOURCE_SHA: ${{ inputs.source-sha }}
run: |
set -euo pipefail
VERSION="${RELEASE_TAG#v}"
ref="ghcr.io/nvidia/openshell/qualification:${VERSION}-run-${GITHUB_RUN_ID}-attempt-${GITHUB_RUN_ATTEMPT}"
oras push "${ref}" \
--artifact-type application/vnd.nvidia.openshell.qualification.v1 \
--annotation "org.opencontainers.image.revision=${SOURCE_SHA}" \
--annotation "org.opencontainers.image.version=${VERSION}" \
qualification-summary.json:application/vnd.nvidia.openshell.qualification.summary.v1+json
echo "Published qualification summary to \`${ref}\`." >> "${GITHUB_STEP_SUMMARY}"
- name: Warn if OCI summary publication failed
if: ${{ !cancelled() && (steps.oras.outcome == 'failure' || steps.ghcr.outcome == 'failure' || steps.oci.outcome == 'failure') }}
run: |
echo "::warning::Could not publish the qualification summary to OCI. The summary remains available in this run's Actions artifacts."
- name: Require current qualification profile
if: steps.summary.outputs.current-profile-passed != 'true'
run: |
echo "Release ${RELEASE_TAG} did not pass the current release-tag-v1 qualification profile." >&2
exit 1