-
Notifications
You must be signed in to change notification settings - Fork 0
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
ROX-27384, ROX-26026: Unify determine-image-tag
task
#16
Merged
+153
−77
Conversation
This file contains 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
msugakov
added a commit
to stackrox/collector
that referenced
this pull request
Jan 2, 2025
1 task
msugakov
force-pushed
the
misha/ROX-27384-unify-determine-image-tag
branch
4 times, most recently
from
January 7, 2025 13:39
346f018
to
c0507d4
Compare
msugakov
added a commit
to stackrox/collector
that referenced
this pull request
Jan 7, 2025
msugakov
force-pushed
the
misha/ROX-27384-unify-determine-image-tag
branch
2 times, most recently
from
January 13, 2025 18:54
c1466d8
to
e5dbcab
Compare
msugakov
added a commit
to stackrox/collector
that referenced
this pull request
Jan 13, 2025
I tried having this logic as part of the regular `determine-image-tag` task but it turned to be oddly-looking when I started adding tagging support and so here I just move it to its own place to live its own life. Note tha this task doesn't call `fail-build-if-git-is-dirty.sh` script because the outputs aren't affected by whether git changes are committed.
We're moving towards https://issues.redhat.com/browse/ROX-27488 and so there's no need to call the external script if the check can be made locally. Note that compared to https://github.com/stackrox/stackrox/blob/b170ccb6e8193151ed5d14799ae984c8c1402724/.konflux/scripts/fail-build-if-git-is-dirty.sh this script doesn't try to restore Dockerfiles because it is executed before prefetch task which makes those changes.
After thinking about it, I concluded that the suppression may have to be done differently and it's not the right time to introduce it yet. (If needed in this form, I could restore it from the git history.)
msugakov
force-pushed
the
misha/ROX-27384-unify-determine-image-tag
branch
from
January 16, 2025 11:04
e5dbcab
to
b0e85e0
Compare
msugakov
added a commit
to stackrox/collector
that referenced
this pull request
Jan 16, 2025
``` Tag from Tekton event: '' Tag reported by Makefile: 'misha-test-8' Tags seen by git: 'misha-test-8' Long git describe output: 'misha-test-8-0-g8d18e3b812' This is not a tag push event but Makefile reports literally the git tag 'misha-test-8'. This happens when a build was triggered not by a tag push event but the commit is tagged and when the Makefile doesn't use '--long' with 'git describe'. /tekton/scripts/script-1-7v9vw: line 73: misha-test-8: command not found We should use a different image tag for this build in order to not mix results with a build that was triggered by the tag push event and which will indeed use as the tag for images built there. Using misha-test-8-0-g8d18e3b812 for the tag. misha-test-8-0-g8d18e3b812-fast ```
msugakov
added a commit
to stackrox/collector
that referenced
this pull request
Jan 16, 2025
msugakov
added a commit
to stackrox/collector
that referenced
this pull request
Jan 16, 2025
msugakov
added a commit
to stackrox/scanner
that referenced
this pull request
Jan 16, 2025
msugakov
added a commit
to stackrox/stackrox
that referenced
this pull request
Jan 16, 2025
4 tasks
msugakov
added a commit
to stackrox/stackrox
that referenced
this pull request
Jan 16, 2025
tommartensen
approved these changes
Jan 17, 2025
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
Here's the unified
determine-image-tag
task with git tags support.It's probably easier to review this PR in its eventual state, although it can be reviewed by commits too.
Factored out of stackrox/stackrox#13422.
Testing
For Collector: stackrox/collector#2001 (ready)
For Scanner: stackrox/scanner#1771 (ready)
For StackRox: stackrox/stackrox#13850 (wip)