Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Introduce a "build_and_push_docker_image" job in artman/circleci #298

Merged
merged 4 commits into from
Oct 9, 2017

Conversation

ethanbao
Copy link
Contributor

@ethanbao ethanbao commented Oct 6, 2017

This is a example when the tasks runs:
https://circleci.com/gh/ethanbao/artman/410

The smoketest (all) will fail, but I manually disabled the smoketest and confirmed that the deploy step will work (see https://hub.docker.com/r/googleapis/artman/tags/ for an auto-build artman docker image).

Copy link
Contributor

@geigerj geigerj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just nits, but please have @lukesneeringer take a look too, since I'm not too familiar with CircleCI

command: |
docker run -it -e RUNNING_IN_ARTMAN_DOCKER=True -v /tmp/reports:/tmp/reports artman /bin/bash -c "pip install pytest; git clone https://github.com/googleapis/googleapis /artman/test/golden/googleapis; py.test /artman/test/golden/artman_golden_test.py --googleapis-dir=/artman/test/golden/googleapis"
# When build performance is a concern, consider separting this job into
# a workflow with multiple jobs and have the smoketest run in parrall

This comment was marked as spam.

This comment was marked as spam.

name: Run golden tests
command: |
docker run -it -e RUNNING_IN_ARTMAN_DOCKER=True -v /tmp/reports:/tmp/reports artman /bin/bash -c "pip install pytest; git clone https://github.com/googleapis/googleapis /artman/test/golden/googleapis; py.test /artman/test/golden/artman_golden_test.py --googleapis-dir=/artman/test/golden/googleapis"
# When build performance is a concern, consider separting this job into

This comment was marked as spam.

This comment was marked as spam.

docker run -it -e RUNNING_IN_ARTMAN_DOCKER=True -v /tmp/reports:/tmp/reports artman /bin/bash -c "pip install pytest; git clone https://github.com/googleapis/googleapis /artman/test/golden/googleapis; py.test /artman/test/golden/artman_golden_test.py --googleapis-dir=/artman/test/golden/googleapis"
# When build performance is a concern, consider separting this job into
# a workflow with multiple jobs and have the smoketest run in parrall
# with additional paied containers.

This comment was marked as spam.

This comment was marked as spam.

name: Run smoketests
command: |
mkdir /tmp/reports
echo "this is a test" >> /tmp/reports/smoketest.log

This comment was marked as spam.

This comment was marked as spam.

- checkout
- setup_remote_docker
- run:
name: Finger crossed!

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@lukesneeringer lukesneeringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nix the echos, but great other than that. :-)

@ethanbao
Copy link
Contributor Author

ethanbao commented Oct 9, 2017

The performance gain is substantial. Saved 20+ mins in building time. More importantly, it is the same cached layer when pushing to Dockerhub, meaning the downstream users will not need to download the whole image for a new docker image in most cases.

@ethanbao ethanbao merged commit b36e7b8 into googleapis:master Oct 9, 2017
@ethanbao
Copy link
Contributor Author

ethanbao commented Oct 9, 2017

Merged, thank you for the review. There is a similar CI PR in googleapis repo: googleapis/googleapis#474. PTAL.

While running the same smoketest script, the googleapis PR uses different artman docker image for different purpose.

saicheems pushed a commit to saicheems/artman that referenced this pull request Oct 12, 2017
…ing other repos to use this repo as bazel repo dependency. (googleapis#298)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants