ROX-26026: Matrixize more jobs in .github/workflow/build.yaml#13694
Merged
ROX-26026: Matrixize more jobs in .github/workflow/build.yaml#13694
.github/workflow/build.yaml#13694Conversation
|
Skipping CI for Draft Pull Request. |
Contributor
|
Images are ready for the commit at a9e7ecd. To use with deploy scripts, first |
4046cc5 to
37bbd15
Compare
ae9f644 to
724aded
Compare
.github/workflow/build.yaml
724aded to
39b0e00
Compare
.github/workflow/build.yaml.github/workflow/build.yaml
msugakov
added a commit
that referenced
this pull request
Jan 3, 2025
I gave lengthy explanation in one of commits in #13694 Referring to that if you need more info.
msugakov
added a commit
that referenced
this pull request
Jan 3, 2025
Since the idea of this overall change is to disable GHA builds into quay.io/rhacs-eng/ for releases, we can simply switch to scan GHA-built images in quay.io/stackrox-io/ which should be there (at least we don't have plans to migrate them to Konflux at this point). Some nerdy extra context: In #13694, the similar change for `.github/workflows/build.yaml`, I could not do the same thing because of a situation with the `stackrox-operator` image: the one is only built into quay.io/rhacs-eng and not built into quay.io/stackrox-io. Therefore I had to introduce a matrix there for the `scan-images-with-roxctl` job. I was musing whether I should introduce the matrix here, in `.github/workflows/scanner-build.yaml`, as well for this `scan-images-with-roxctl` job. The benefit is consistency of workflows. The downside is more complexity to this workflow.
Contributor
Author
|
/test ? |
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
/test ocp-4-17-operator-e2e-tests |
Contributor
Author
|
/test gke-operator-e2e-tests |
4 tasks
msugakov
added a commit
that referenced
this pull request
Jan 6, 2025
I gave lengthy explanation in one of commits in #13694 Referring to that if you need more info.
msugakov
added a commit
that referenced
this pull request
Jan 6, 2025
Since the idea of this overall change is to disable GHA builds into quay.io/rhacs-eng/ for releases, we can simply switch to scan GHA-built images in quay.io/stackrox-io/ which should be there (at least we don't have plans to migrate them to Konflux at this point). Some nerdy extra context: In #13694, the similar change for `.github/workflows/build.yaml`, I could not do the same thing because of a situation with the `stackrox-operator` image: the one is only built into quay.io/rhacs-eng and not built into quay.io/stackrox-io. Therefore I had to introduce a matrix there for the `scan-images-with-roxctl` job. I was musing whether I should introduce the matrix here, in `.github/workflows/scanner-build.yaml`, as well for this `scan-images-with-roxctl` job. The benefit is consistency of workflows. The downside is more complexity to this workflow.
so that later we can more easily disable the ones for RHACS_BRANDING.
`-e` is already set.
`-u` will remain as an exercise for the future.
When touching the code of `scan-images-with-roxctl`, I wasn't sure
why there's `roxctl > file` followed by `cat file`.
Since I changed that to `| tee`, I wanted to be sure the pipe won't
swallow any bad exit code from the command.
Ran `set -o` in the pipeline and found `pipefile` not being set.
Here's the full dump:
```
allexport off
braceexpand on
emacs off
errexit on
errtrace off
functrace off
hashall on
histexpand off
history off
ignoreeof off
interactive-comments on
keyword off
monitor off
noclobber off
noexec off
noglob off
nolog off
notify off
nounset off
onecmd off
physical off
pipefail off
posix off
privileged off
verbose off
vi off
xtrace off
```
I don't know why we wouldn't want `errexit` and `pipefail` always on.
Therefore I change the default shell for the entire workflow.
Notably, `bash` isn't literally the command it's a value from some
enum that GHA has, and the actual command is selected based on the
value from this enum.
`bash` translates to `bash --noprofile --norc -eo pipefail {0}`.
Weird, isn't it?
See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell
For easier testing changes in PRs.
39b0e00 to
a9e7ecd
Compare
Contributor
Author
|
/test gke-operator-e2e-tests |
tommartensen
approved these changes
Jan 7, 2025
Contributor
tommartensen
left a comment
There was a problem hiding this comment.
TIL (or remembered) matrix.exclude
ajheflin
pushed a commit
that referenced
this pull request
Jun 24, 2025
msugakov
added a commit
that referenced
this pull request
Jun 25, 2025
msugakov
added a commit
that referenced
this pull request
Jun 25, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
For release builds we need to disable GHA builds which push into
quay.io/rhacs-eng/and use Konflux for that instead.This change allows more easily conditionally disable GHA builds by suppressing
RHACS_BRANDINGfrom the matrix in thedefine-job-matrixjob.Extracted from #13422 and refined.
User-facing documentation
Testing and quality
Automated testing
No change to automated tests.
How I validated my change