Skip to content
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: docker deployment #801

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

KyleTryon
Copy link

@KyleTryon KyleTryon commented Apr 16, 2023

This change updates the CircleCI config to include separate testing and newly added docker building and deployment. The image will be published when a tag is pushed to both latest and the pushed tag.

Consideration: This will require a Dockerhub username and password. Ideally, this should be added as a Context and referenced in the workflow.

chore: lint and format
tags:
only: /.*/
- docker-deploy:
requires:
Copy link
Author

@KyleTryon KyleTryon Apr 16, 2023

Choose a reason for hiding this comment

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

Create a https://circleci.com/docs/contexts/ context with the Dockerhub login and password.

Required:

  • DOCKER_PASSWORD
  • DOCKER_USERNAME
Suggested change
requires:
context: [docker-deploy]
requires:

In this configuration, this job will not run on pull requests, as contexts will only run when triggered by org users for security.

If you would like, I could split the docker build/test job and docker deploy job. In that situation, we will build and test the docker image on every commit and only deploy on tag. This is more correct but will use a bit more credits.

@KyleTryon
Copy link
Author

Hey @jacebrowning, any comments for this?

@jacebrowning
Copy link
Owner

@KyleTryon thanks for adding this! I don't plan to publish Docker images for this project at this time but validating the Docker builds looks great! Perhaps you could update this so docker push is skipped when credentials are missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants