-
Notifications
You must be signed in to change notification settings - Fork 280
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
Update docker build script to optionally publish images to DockerHub #283
Update docker build script to optionally publish images to DockerHub #283
Conversation
Test FAILed. |
Test FAILed. |
Test PASSed. |
bin/build_docker_images.sh
Outdated
|
||
# Build the Clipper Docker images. | ||
build_images () { | ||
# True and false indicate whether or not to public the image. We public public images. |
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.
Nit: Can we use an alternative to the verb usage of public
? "make the image public" is easier to understand.
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.
Oops. That's the result of a botched find/replace. Should read "True and false indicate whether or not to publish the image. We publish public images."
@@ -1,4 +1,4 @@ | |||
ARG CODE_VERSION=develop |
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.
I'm guessing that we're removing these default arguments because the images build script, in conjunction with VERSION.txt
are intended to be the point of control for image versioning?
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.
Exactly. And removing the default makes sure that the build fails if we forget a build arg instead of silently building with "develop"
@@ -1,3 +1,5 @@ | |||
# This ARG isn't used but prevents warnings in the build script |
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.
Should we also add this note to RPCDockerfile
and ClipperLibBaseDockerfile
?
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.
Done.
bin/build_docker_images.sh
Outdated
# This script builds all the public Docker images that the Clipper project distributes | ||
# and pushes them to Docker hub. | ||
# Each image is pushed with the tag <image_name>:version | ||
# In addition, if the version is "develop", each image will also be |
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.
I don't think this is accurate. We're always tagging images with a git hash, regardless of version. What's the reasoning behind only tagging of the version is "develop"?
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.
Yeah I wrote the comment before I wrote the script. Will update the wording to be consistent.
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
Test FAILed. |
Test PASSed. |
This script cleans up the
bin/build_docker_images.sh
script and adds the ability to publish the images to DockerHub. The interface is the same, so it shouldn't break our existing Jenkins setup.This script creates two tags for each image:
With the publish option, both tags will be pushed to Dockerhub.
Closes #275.
TODOs after the PR is merged:
--publish
option as a post-commit job in Jenkins.in Jenkins from the Clipper and Clipper-PRB jobs. This PR adds that call to the
./bin/run_ci.sh` script, so we don't need to call it separately in Jenkins.