Skip to content

ROX-27716: Enable Konflux builds to replace GHA#15309

Merged
msugakov merged 8 commits intomasterfrom
misha/ROX-27716-take-konflux-on-release
May 26, 2025
Merged

ROX-27716: Enable Konflux builds to replace GHA#15309
msugakov merged 8 commits intomasterfrom
misha/ROX-27716-take-konflux-on-release

Conversation

@msugakov
Copy link
Contributor

@msugakov msugakov commented May 15, 2025

Description

For release builds, for quay.io/rhacs-eng images.

Paired with stackrox/konflux-tasks#55

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

No change.

How I validated my change

See stackrox/konflux-tasks#55

@openshift-ci
Copy link

openshift-ci bot commented May 15, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

This comment was marked as outdated.

@rhacs-bot
Copy link
Contributor

rhacs-bot commented May 15, 2025

Images are ready for the commit at 910484a.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.8.x-797-g910484afdf.

@codecov
Copy link

codecov bot commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.21%. Comparing base (8028a42) to head (910484a).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15309      +/-   ##
==========================================
- Coverage   49.21%   49.21%   -0.01%     
==========================================
  Files        2577     2577              
  Lines      189083   189083              
==========================================
- Hits        93065    93062       -3     
- Misses      88682    88684       +2     
- Partials     7336     7337       +1     
Flag Coverage Δ
go-unit-tests 49.21% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@msugakov msugakov force-pushed the misha/ROX-27716-take-konflux-on-release branch from 58d59cd to e6a19aa Compare May 15, 2025 18:43
@msugakov msugakov mentioned this pull request May 16, 2025
@msugakov msugakov force-pushed the misha/ROX-27716-take-konflux-on-release branch from e6a19aa to 37d89bc Compare May 16, 2025 17:11
@github-actions github-actions bot added the konflux-build Run Konflux in PR. Push commit to trigger it. label May 16, 2025
@msugakov msugakov changed the title ROX-27716: wip ROX-27716: Enable Konflux builds to replace GHA May 19, 2025
@msugakov msugakov added backport-for-4.6-konflux-release https://redhat-internal.slack.com/archives/C05TS9N0S7L/p1730134914487439 backport-for-4.7-konflux-release https://redhat-internal.slack.com/archives/C05TS9N0S7L/p1739787699448879 labels May 19, 2025
@msugakov msugakov force-pushed the misha/ROX-27716-take-konflux-on-release branch 2 times, most recently from bb3c4e8 to d53b86d Compare May 19, 2025 10:51
@msugakov msugakov force-pushed the misha/ROX-27716-take-konflux-on-release branch 6 times, most recently from 14c2a59 to 5c8c907 Compare May 20, 2025 09:01
@stackrox stackrox deleted a comment from openshift-ci bot May 20, 2025
@msugakov msugakov marked this pull request as ready for review May 20, 2025 09:02
@msugakov msugakov requested review from a team as code owners May 20, 2025 09:02
@msugakov msugakov marked this pull request as draft May 20, 2025 09:03
@msugakov msugakov requested a review from tommartensen May 21, 2025 11:56
Copy link
Contributor

@tommartensen tommartensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few points for discussion:

  1. I find the tests easier to read if they are not table tests.
  2. Can we combine tests like "should tell Both when non-release tag pushed" for Konflux&GHA into one? It might make clearer what the env vars are set to in GHA&Konflux when a tag is pushed.
  3. Could the script, test and hold file live in a separate directory in scripts/ci?

@msugakov
Copy link
Contributor Author

@tommartensen

  1. I find the tests easier to read if they are not table tests.

Deal.

  1. Can we combine tests like "should tell Both when non-release tag pushed" for Konflux&GHA into one? It might make clearer what the env vars are set to in GHA&Konflux when a tag is pushed.

You suggest to change the grouping per use-case (so that groups are "release tag", "non-release tag", "release branch push", "non-release branch push", "PR to release branch", etc.) instead of grouping per CI ("Konflux" and "GHA"). Right? I can easily make it. Just need to make sure I understand correctly.

  1. Could the script, test and hold file live in a separate directory in scripts/ci?

Since the thing is called from both GHA and Konflux I thought pacing it in scripts/ci is ok. I can't come up with a better location or a subdirectory name. Please suggest.

@tommartensen
Copy link
Contributor

Right? I can easily make it. Just need to make sure I understand correctly.

Yes, that was my intention.

Since the thing is called from both GHA and Konflux I thought pacing it in scripts/ci is ok. I can't come up with a better location or a subdirectory name. Please suggest.

I don't have a good suggestion - let's put leave it there then!

@msugakov
Copy link
Contributor Author

Reordered tests, PTAL.

@msugakov msugakov requested a review from tommartensen May 21, 2025 16:05
msugakov added 8 commits May 22, 2025 17:51
to get Konflux image tag suffix suppression
When there's only one matrix item (RHACS_BRANDING) and when it gets
excluded (with `exclude`), the corresponding job still runs but in
no-matrix mode. It's weird but that's the way it works.

`build-and-push-operator` seems to be the only job like this and
for it the default branding STACKROX_BRANDING gets assumed which
results in building images tagged for quay.io/stackrox-io.
Subsequently, any job steps that try to work with quay.io/rhacs-eng
images fail and so I disable them with an additional clause in the
`if` condition.
Only moved test functions and updated some comments.
No change to tests themselves.
@msugakov msugakov force-pushed the misha/ROX-27716-take-konflux-on-release branch from c53914b to 910484a Compare May 22, 2025 15:54
@msugakov msugakov merged commit 0309e52 into master May 26, 2025
115 checks passed
@msugakov msugakov deleted the misha/ROX-27716-take-konflux-on-release branch May 26, 2025 08:11
msugakov added a commit that referenced this pull request May 27, 2025
I reverted changes from #15309
except for changes in `.tekton/` directory (where the new task was
used because that'll be updated in this same PR).
My sequence was:

```
git revert 0309e52
git reset --soft HEAD~
git restore --staged .tekton
git commit
```

No other changes.

This makes sure `should-konflux-replace-gha-build.*` stuff disappears
as well as its use in GHA.
msugakov added a commit that referenced this pull request May 27, 2025
I reverted changes from #15309
except for changes in `.tekton/` directory (where the new task was
used because that'll be updated in this same PR).
My sequence was:

```
git revert 0309e52
git reset --soft HEAD~
git restore --staged .tekton
git commit
```

No other changes.

This makes sure `should-konflux-replace-gha-build.*` stuff disappears
as well as its use in GHA.
msugakov added a commit that referenced this pull request May 28, 2025
I reverted changes from #15309
except for changes in `.tekton/` directory (where the new task was
used because that'll be updated in this same PR).
My sequence was:

```
git revert 0309e52
git reset --soft HEAD~
git restore --staged .tekton
git commit
```

No other changes.

This makes sure `should-konflux-replace-gha-build.*` stuff disappears
as well as its use in GHA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci backport-for-4.6-konflux-release https://redhat-internal.slack.com/archives/C05TS9N0S7L/p1730134914487439 backport-for-4.7-konflux-release https://redhat-internal.slack.com/archives/C05TS9N0S7L/p1739787699448879 konflux-build Run Konflux in PR. Push commit to trigger it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants