[JENKINS-67572] Allow docker digest in image names#93
[JENKINS-67572] Allow docker digest in image names#93rsandell merged 5 commits intojenkinsci:masterfrom
Conversation
|
Great job, looking forward to this getting merged! Currently our workflows are failing because of this regression and we cannot really downgrade our plugins so hoping that this will be released ASAP. |
|
As a workaround, you can disable the validation see https://github.com/jenkinsci/docker-commons-plugin/blob/master/src/main/java/org/jenkinsci/plugins/docker/commons/credentials/ImageNameValidator.java#L48 |
|
@j3t I know, but that fully disables all checks again and we are vulnerable again. So i hope this gets merge and released soon. @rsandell @oleg-nenashev Any changes to get this done sooner than later? |
@j3t We are starting Jenkins with |
|
I think you are probably also hit by |
src/main/java/org/jenkinsci/plugins/docker/commons/credentials/ImageNameValidator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/docker/commons/credentials/ImageNameValidator.java
Show resolved
Hide resolved
src/test/java/org/jenkinsci/plugins/docker/commons/credentials/ImageNameValidatorTest.java
Show resolved
Hide resolved
…/ImageNameValidatorTest.java Co-authored-by: Robert Sandell <rsandell@cloudbees.com>
|
OK, fixed tests and now validating against oci spec. So please review again. 🤗 |
|
|
|
Thanks, updated jenkins and removed workaround and everything works 🎉 |
|
Is this possibly fixing some cases but not all or has something here / nearby changed that means my configuration no longer works? I'm seeing: Where the registry variable is pulled from credentials while the repo and hash are defined within the pipeline itself. with v1.19 of this plugin and v1.28 of docker-workflow on linux actually I guess that's JENKINS-67633 |
|
@ccayg-sainsburys Yeah, this is almost certainly JENKINS-67633. I've left a comment there so it's more-visible to users with that issue. |
Thanks - and the suggested fix there does work but because one of the values comes from credentials it triggers: I might just replace with shell commands at this point to be honest. |
|
For data from credentials, don't use |
Allow docker digests in image names, as since c069b79 it's no longer allowed in
docker-workflow-pluginto pin docker images.