-
Notifications
You must be signed in to change notification settings - Fork 12
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
Bring in cosign sign and attest support and fix verify-enterprise-contract #1
Conversation
resources/gather-deploy-images.sh
Outdated
done | sort -u > "$IMAGES_FILE" | ||
|
||
# For development purposes, allow injecting your own list of images | ||
if [ -n "${MY_IMAGES_TO_VERIFY}" ]; then |
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.
won't the script fail if MY_IMAGES_TO_VERIFY is unset (because of set -u
)
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.
Thanks, good catch.
if [ -n "${MY_IMAGES_TO_VERIFY}" ]; then | |
if [ -n "${MY_IMAGES_TO_VERIFY:-}" ]; then |
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.
Done in an upcoming revision.
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.
Actually maybe this could be removed entirely. It was useful when I was testing this in the tssc-jenkins repo, but perhaps it could be dropped for this repo.
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.
(Decided to remove it from the next revision.)
Thanks very much for the reviews. I'll aim to push a new revision later today. |
Short explanation: Clean up the code a little by using a variable. Long explanation: This task gets converted to a bash script and wrapped by a Jenkins shared library in the brand new RHTAP Jenkins pipeline same templates. When testing the RHTAP Jenkins pipeline I found the default Jenkins user could not write to /tmp/, so I wanted to change the location of the file. This refactor makes that just a single line change, rather than having to change the path in three different places. See also redhat-appstudio/tssc-sample-jenkins#1 where this PR was suggested by @mmorhun, and also redhat-appstudio/tssc-dev-multi-ci#2 where the cosign, Enterprise Contract, and promote pipeline support was being added to the RHTAP Jenkins templates.
Short explanation: Clean up the code a little by using a variable. Long explanation: This task gets converted to a bash script and wrapped by a Jenkins shared library in the brand new RHTAP Jenkins pipeline sample templates. When testing the RHTAP Jenkins pipeline I found the default Jenkins user could not write to /tmp/, so I wanted to change the location of the file. This refactor makes that just a single line change, rather than having to change the path in three places. See also redhat-appstudio/tssc-sample-jenkins#1 where this PR was suggested by @mmorhun, and also redhat-appstudio/tssc-dev-multi-ci#2 where the cosign, Enterprise Contract, and promote pipeline support was being added to the RHTAP Jenkins templates.
Short explanation: Clean up the code a little by using a variable. Long explanation: This task gets converted to a bash script and wrapped by a Jenkins shared library in the brand new RHTAP Jenkins pipeline sample templates. When testing the RHTAP Jenkins pipeline I found the default Jenkins user could not write to /tmp/, so I wanted to change the location of the file. This refactor makes that just a single line change, rather than having to change the path in three places. See also redhat-appstudio/tssc-sample-jenkins#1 where this PR was suggested by @mmorhun, and also redhat-appstudio/tssc-dev-multi-ci#2 where the cosign, Enterprise Contract, and promote pipeline support was being added to the RHTAP Jenkins templates.
These changes come from the following PR: redhat-appstudio/tssc-dev-multi-ci#2 See commit messages for more details on these changes. Initial diff generated with hack/copy-to-tssc-templates in that repo, but there were some manual tweaks done, including adding cosign_sign_attest to the rhtap.groovy file, and removing the some debugging code from rhtap/gather-deploy-images.sh related to the MY_IMAGES_TO_VERIFY var. Ref: https://issues.redhat.com/browse/EC-740
Quality Gate passedIssues Measures |
Short explanation: Clean up the code a little by using a variable. Long explanation: This task gets converted to a bash script and wrapped by a Jenkins shared library in the brand new RHTAP Jenkins pipeline sample templates. When testing the RHTAP Jenkins pipeline I found the default Jenkins user could not write to /tmp/, so I wanted to change the location of the file. This refactor makes that just a single line change, rather than having to change the path in three places. See also redhat-appstudio/tssc-sample-jenkins#1 where this PR was suggested by @mmorhun, and also redhat-appstudio/tssc-dev-multi-ci#2 where the cosign, Enterprise Contract, and promote pipeline support was being added to the RHTAP Jenkins templates.
These changes come from the following PR:
redhat-appstudio/tssc-dev-multi-ci#2
See commit messages for more details on these changes.
Initial diff generated with hack/copy-to-tssc-templates in that repo, but I added cosign_sign_attest to the rhtap.grooy file by hand.
See also: redhat-appstudio/tssc-sample-templates#63
Ref: EC-740