Repository navigation
ci: build once, gate the digest, promote what was tested (RT#1550) #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
befe98f
ci: build once, gate the digest, promote what was tested (RT#1550)
fatherlinux ce39bc0
ci: constitution v1.39.2, rhsm passes both build-secret ids (RT#1550)
fatherlinux c2d2f2f
ci: constitution v1.39.4: the RHSM_ACTIVATION_KEY secret mounts (RT#1…
fatherlinux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Container release: build once per change, gate the digest, promote what was | ||
| # tested (constitution III and Container Image VII). Quay.io only. | ||
| # | ||
| # ubi10-httpd-php-postgres is part of the ubi10 cascade: it cuts no release, so `cascade: true` | ||
| # moves :latest with :main, and it is rebuilt when its parent dispatches | ||
| # parent-image-updated. | ||
|
|
||
| name: Container | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| tags: ["v*"] | ||
| repository_dispatch: | ||
| types: [parent-image-updated] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| container: | ||
| uses: crunchtools/constitution/.github/workflows/[email protected] | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| with: | ||
| image: quay.io/crunchtools/ubi10-httpd-php-postgres | ||
| rhsm: true | ||
| boot: systemd | ||
| contract-test: tests/gate.sh | ||
| cascade: true | ||
| secrets: | ||
| QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | ||
| QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | ||
| RHSM_ACTIVATION_KEY: ${{ secrets.RHSM_ACTIVATION_KEY }} | ||
| RHSM_ORG_ID: ${{ secrets.RHSM_ORG_ID }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
| # The contract test for container-release.yml: boot $IMAGE (the gated digest) | ||
| # under systemd and run the smoke tests inside it. | ||
| set -euo pipefail | ||
| : "${IMAGE:?IMAGE is the digest under test}" | ||
| name="contract-$$" | ||
| podman run -d --name "$name" --systemd=always "$IMAGE" >/dev/null | ||
| trap 'podman rm -f "$name" >/dev/null' EXIT | ||
| for _ in $(seq 1 60); do | ||
| state=$(podman exec "$name" systemctl is-system-running 2>/dev/null || true) | ||
| case "$state" in running|degraded) break ;; esac | ||
| sleep 1 | ||
| done | ||
| podman cp tests/smoke-test.sh "$name:/tmp/smoke-test.sh" | ||
| podman exec "$name" bash /tmp/smoke-test.sh |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HIGH (Constitution): The workflow has no weekly cron trigger, despite the project requirement that workflows include one for base-image security updates.
Suggestion: Add a weekly
scheduletrigger to this workflow.Evidence:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a bug: this is a cascade child. The weekly errata rebuild starts at the chain's root, ubi10-core (its schedule,
0 6 * * 1), whose promotion dispatchesparent-image-updateddown the chain, so this image is rebuilt weekly through its own gates. A cron of its own would rebuild against an un-refreshed parent. The Container Image profile's cascade section covers this, and this workflow had no cron before the PR either.