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
[FIXED JENKINS-46277] Do a pull for stage-level docker agent too #182
Conversation
abayer
commented
Aug 17, 2017
- JENKINS issue(s):
- JENKINS-46277
- Description:
- When we're at the top level, we want do do a pull of the docker image, but we want to do it within a synthetic stage. That's all well and good, but until now, the way this was done meant we weren't doing an image pull if we were at the stage level. That was dumb. Fixed!
- Documentation changes:
- n/a
- Users/aliases to notify:
- @reviewbybees
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
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.
🐝
@@ -50,6 +50,9 @@ public class DockerPipelineScript extends AbstractDockerPipelineScript<DockerPip | |||
} | |||
} | |||
try { | |||
if (Utils.withinAStage()) { | |||
script.getProperty("docker").image(describable.image).pull() | |||
} |
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.
But doesn't the line below pull the image if it doesn't exist already?
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.
If it doesn't exist, yes, but it doesn't update if there's a newer version.
If you do not use a docker registry this change breaks the pipeline. Previously it was enough to keep the images locally, but this The simple workaround is to patch the plugin to revert this change, but it would be nice to avoid that. If you think Am I missing something? Is there some way to make it work with local images? |
@oysols Argh! Very sorry to hear that - could you open an issue at issues.jenkins-ci.org? I'm planning a 1.2.1 release for probably end of this week and will try to find a good option here. |
Opened an issue: https://issues.jenkins-ci.org/browse/JENKINS-47106 |
Thank-you @oysols for opening the issue. I think it would be appropriate for the priority to be updated to be 'major' or 'critical', and for there to be some announcement about this being a breaking bug. Upgrading to this version of the plugin, when you have images that are stored locally, apparently breaks the build pipeline. So anyone using the previous version and having local images in their pipeline need to be aware this bug will break their build. (apologies in advance for cross-posting, but this caused quite a bit of headaches for us, which other people shouldn't have to suffer.) |
I'll be fixing the issue today or tomorrow, with a release planned for Friday, FYI. |