-
Notifications
You must be signed in to change notification settings - Fork 144
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
Push builds images without respecting the args
argument
#309
Comments
This indeed looks like a bug or, at least, very poor documentation |
@patrobinson, first and foremost sorry for the delay in getting back to you. Hope that you have continued to use the plugin since and found the improvements and fixes made since you reported the issue helpful. I believe I have finally figured out what was wrong with this scenario (in addition to the As mentioned in #325 the implications of allowing multiple "stages" to be used in the same step would have unintended consequences and this one appears to be one of them. A double-build is definitely not a desired behaviour, but shouldn't delay the step too much thanks to docker's layer cache (so the second build should basically be a no-op). If you have more information about this particular scenario we will be more than happy to continue to troubleshoot and/or get ideas for future improvements of this plugin :) |
I've recently experienced a very similar issue, whereby we are building and pushing the image in the same step. The main issue and probably most concerning is that the Example config that builds the service
In fact, if you just use the
Adding
I think this is quite likely by design, as docs refer to args being only for build and run steps, but perhaps there should be a warning saying args that are defined will not be used in these scenarios, as it can lead to confusion. Happy to provide more info or logs if useful. |
@rjl79 that would be correct... I'm thinking of a backwards-incompatible change in which images are not built in |
@toote thanks for the quick response. Would you see this as requiring an explicit |
@rjl79 there are three possible scenarios:
|
Push builds an image without respecting args argument
If you specify build and push at the same time, the image will be built twice
The resulting image built without
args
argument will be pushedSo if you configure the plugin like so:
This way works:
https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/blob/master/commands/push.sh#L41 should probably call the same code path that build uses, allowing it respect all arguments build supports.
The text was updated successfully, but these errors were encountered: