Skip to content
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

avoids image name error when pulling from non-default registery #1055

Closed

Conversation

mahdipub
Copy link
Contributor

when pulling from a non-default registery, you will have local image in full name include docker registery in it. But the whole pipeline works with DEFAULT behaviour when pulling from dockerhub that creates local image with image name only. This change, adds a tag to pulled local image with image_name only and avoids issue in continue. Also as a result of changes we do not need to clean dockerImageDigest later in the code. So that line removed.

Signed-off-by: [email protected]

Copy link

Thank you for creating a pull request!

Please check out the information below if you have not made a pull request here before (or if you need a reminder how things work).

Code Quality and Contributing Guidelines

If you have not done so already, please familiarise yourself with our Contributing Guidelines and Code Of Conduct, even if you have contributed before.

Tests

Github actions will run a set of jobs against your PR that will lint and unit test your changes. Keep an eye out for the results from these on the latest commit you submitted. For more information, please see our testing documentation.

In order to run the advanced pipeline tests (executing a set of mock pipelines), it requires an admin to post run tests on this PR.
If you are not an admin, please ask for one's attention in #infrastructure on Slack or ping one here.
To run full set of tests, use "run tests"; a subset of tests on specific jdk version, use "run tests quick 11,21"

when pulling from a non-default registery, you will have local image in full name include docker registery in it. But the whole pipeline works with DEFAULT behaviour when pulling from dockerhub that creates local image with image name only. This change, adds a tag to pulled local image with image_name only and avoids issue in continue. Also as a result of changes we do not need to clean `dockerImageDigest` later in the code. So that line removed.

Signed-off-by: [email protected]
@karianna karianna force-pushed the dockerPullFromNonDefaultReg branch from f1195bf to 97169d5 Compare June 28, 2024 22:59
@mahdipub
Copy link
Contributor Author

mahdipub commented Jul 9, 2024

As not all docker images has .RepoDigests then counting on index 0 of it could cause issues like:

docker inspect '--format={{index .RepoDigests 0}}' adoptopenjdk/centos7_build_image_cuda

template parsing error: template: :1:2: executing "" at <index .RepoDigests 0>: error calling index: reflect: slice index out of range

So I am going to close this and reopen another one without that code improvement change.

@mahdipub mahdipub closed this Jul 9, 2024
@mahdipub
Copy link
Contributor Author

mahdipub commented Jul 9, 2024

other PR without code improvement #1076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants