Last active
January 6, 2019 17:42
-
-
Save jackinf/144008cb55f251a4e63a6ba2e168310c to your computer and use it in GitHub Desktop.
CircleCI simple configuration for building and pushing Docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .circleci/config.yml should be in the root of the project | |
version: 2 | |
general: | |
branches: | |
only: | |
- develop | |
- master | |
jobs: | |
build: | |
machine: true | |
steps: | |
- checkout | |
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS | |
- run: docker build -t $IMAGE_TAG:$CIRCLE_BRANCH . | |
- run: docker push $IMAGE_TAG:$CIRCLE_BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment