-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add testing Dockerfile and Cloud Build configuration #3776
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
Add testing Dockerfile and Cloud Build configuration #3776
Conversation
.kokoro/docker/Dockerfile
Outdated
# Enable redis-server on boot. | ||
RUN sudo systemctl enable redis-server.service | ||
|
||
CMD ["python3.6"] |
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.
Possible to add a newline at the end?
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
.kokoro/docker/cloudbuild.yaml
Outdated
args: ['build', '-t', 'gcr.io/$PROJECT_ID/python-samples-testing-docker', '.'] | ||
dir: '.kokoro/docker' | ||
images: | ||
- 'gcr.io/$PROJECT_ID/python-samples-testing-docker' |
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.
ditto
libdb5.3-dev \ | ||
libexpat1-dev \ | ||
libffi-dev \ | ||
liblzma-dev \ |
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.
Can we add libmagickwand-dev
here?
Now we install it on the fly:
apt-get -qq update && apt-get -qq install libmagickwand-dev > /dev/null |
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
@shubha-rajan After merging this, can you actually use this file for updating the image? If yes, then once finished, please let us know. We will probably run one of the periodic builds manually to see if the new image works. Then we can remove the unnecessary code in |
@shubha-rajan When uploading the docker image, is it possible to have date and/or version in the name or tag? It is great if we have a way to rollback easily. |
+1, Commit number would be great. Also, taking a second look at this, what do we need to do to add the github actions trigger? Will it rebuild every commit, or can we limit it to only changes in the dockerfile? |
I just updated the cloudbuild config to tag images with the shortened commit hash. And you can limit it to only changes to files in specified directories. |
Ok, slick. I think we should merge this as is then and use a different PR to change the image name. @tmatsuo Sound good to you? |
@kurtisvg Yes it sounds good! |
Towards #3442
I tested the cloud build trigger on my own fork and a separate project and it works - we just need to add a trigger for this repo on the Cloud-Devrel-Kokoro-Resources project.
For now, the Dockerfile is just a copy of python-multi, but we can update it in a separate PR and update the kokoro configs to point to the new image as a final step.