Skip to content

Conversation

@shubha-rajan
Copy link
Contributor

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.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 16, 2020
@shubha-rajan shubha-rajan marked this pull request as ready for review May 18, 2020 17:09
@shubha-rajan shubha-rajan requested a review from a team as a code owner May 18, 2020 17:09
# Enable redis-server on boot.
RUN sudo systemctl enable redis-server.service

CMD ["python3.6"] No newline at end of file
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

args: ['build', '-t', 'gcr.io/$PROJECT_ID/python-samples-testing-docker', '.']
dir: '.kokoro/docker'
images:
- 'gcr.io/$PROJECT_ID/python-samples-testing-docker' No newline at end of file
Copy link
Contributor

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 \
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@tmatsuo tmatsuo requested a review from kurtisvg May 18, 2020 20:59
@tmatsuo
Copy link
Contributor

tmatsuo commented May 19, 2020

@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 run_tests.sh.

@tmatsuo
Copy link
Contributor

tmatsuo commented May 19, 2020

@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.

@kurtisvg
Copy link
Contributor

kurtisvg commented May 19, 2020

@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?

@shubha-rajan
Copy link
Contributor Author

shubha-rajan commented May 19, 2020

@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.

@shubha-rajan
Copy link
Contributor Author

For reference, these are the settings I used when setting up the trigger in my test project.
image
image

@kurtisvg
Copy link
Contributor

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?

@tmatsuo
Copy link
Contributor

tmatsuo commented May 19, 2020

@kurtisvg Yes it sounds good!

@shubha-rajan
Copy link
Contributor Author

@tmatsuo @kurtisvg great! I'll merge this and open another PR to change the image name as soon as the tests pass.

@kurtisvg kurtisvg merged commit dc5ed39 into GoogleCloudPlatform:master May 19, 2020
gcf-merge-on-green bot pushed a commit that referenced this pull request May 20, 2020
Updating kokoro build configs to use the image from PR #3776 
Towards #3442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants