-
Notifications
You must be signed in to change notification settings - Fork 188
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
Fix buildah clustertask to support long image names #2033
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jordi Gil <jgil@redhat.com>
Hi @jordigilh. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/lgtm |
buildah --storage-driver=$(params.STORAGE_DRIVER) push \ | ||
$(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \ | ||
--digestfile /tmp/image-digest $(params.IMAGE) \ | ||
docker://$(params.IMAGE) | ||
--digestfile /tmp/image-digest $IMAGE docker://$IMAGE |
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.
@jordigilh thanks for the PR, I see we use $(params.IMAGE)
on line number 90. can you please update that entry too?
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
/hold |
Should I also raise a PR there? |
ah superb 👼🏼 yeah that would be perfect @jordigilh 🤗 |
Signed-off-by: Jordi Gil <jgil@redhat.com>
New changes are detected. LGTM label has been removed. |
I stand corrected. It's not needed because it's a script itself and the parameters are passed as environment values directly, so the problem I faced here won't happen there. I got carried away when I saw a similar structure to the _buildah push ${PARAMS_PUSH_EXTRA_ARGS} \
--digestfile="${digest_file}" \
${PARAMS_IMAGE} \
docker://${PARAMS_IMAGE} |
...t/operator/kodata/tekton-addon/addons/02-clustertasks/source_local/buildah/buildah-task.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Jordi Gil <jgil@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
Fixes a problem in the buildah clustertask where when provided with a long image name (e.g.
image-registry.openshift-image-registry.svc:5000/test/serverless-workflow-mtaanalysis:1.0
), it caused the generated script to wrap the line which is interpreted by the shell as a new command, rather than part of the previous command:Currently, the script generates this
push
command:Which, when executed, it fails with this error:
The proposal fix here is to capture the value of the image in an environment variable and use it in the
push
command, avoiding the wrapping and ensuring it is not affected by any image length.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lint
before submitting a PRRelease Notes