-
Notifications
You must be signed in to change notification settings - Fork 13
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
ci: support for stable build #29
Conversation
@@ -1,4 +1,5 @@ | |||
FROM python:3.8.3 | |||
ARG version=latest |
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.
Maybe this is a detail but why is the default in the Dockerfile latest
?
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.
It's arbitrary, but nice to have a default so if we do a docker build
with no --build-arg
we still get something useful. Note, we also duplicate that default value in the workflow inputs
, since the workflow-trigger action doesn't yet support that.
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.
Thanks! Looks good.
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.
LGTM. Just to confirm my read, from now on, if we build an image, a build-arg being either stable
or latest
should be specified, right? There is no default behavior without specifying the parameter. But if we run docker compose, for docker-compose.dev.yml
, it will do latest
and for docker-compose.yml
, it's stable
.
The
Kind of, but just to clarify, pretty much all you can do with |
Purpose
Add version argument to docker build which allows reusing the dockerfile to produce both latest and stable images.
What the code is doing
The
latest
branch is unchanged, but now we could also passstable
as an input to the workflow, which will get passed as a build-arg to docker, causing it to install the package from PyPI instead. The default image in the compose file is changed to bestable
, but a user can override this using the.dev.yml
file.Testing
Tested the bash script and stable build from the command line, and tested the workflow input functionality in my test-ci repo. Example:
Time estimate
5 min