Created
June 1, 2015 06:08
-
-
Save mbrevoort/dcdbbb4e2d5b2f62f407 to your computer and use it in GitHub Desktop.
CircleCI Circle.yml for building Godeps backed Go service and building and pushing to private docker registry
This file contains 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
machine: | |
services: | |
- redis | |
- docker | |
environment: | |
PROJECT_NAME: <your-project> | |
checkout: | |
post: | |
- rm -rf ~/.go_workspace/src/github.com/<YOUR-ORG-OR-USER>/$PROJECT_NAME | |
- mkdir -p ~/.go_workspace/src/github.com/<YOUR-ORG-OR-USER>/$PROJECT_NAME | |
- cp -R ~/$PROJECT_NAME ~/.go_workspace/src/github.com/<YOUR-ORG-OR-USER>/ | |
- rm -rf ~/$PROJECT_NAME | |
- ln -s ~/.go_workspace/src/github.com/<YOUR-ORG-OR-USER>/$PROJECT_NAME ~/$PROJECT_NAME | |
dependencies: | |
override: | |
- make init | |
- docker login -u $DOCKER_USER -p $DOCKER_PASS -e "$DOCKER_EMAIL" quay.io | |
- docker build -t quay.io/<YOUR-ORG-OR-USER>/$PROJECT_NAME:${CIRCLE_SHA1:0:7} . | |
test: | |
override: | |
- make test-circle | |
deployment: | |
quayio: | |
branch: master | |
commands: | |
- docker push quay.io/<YOUR-ORG-OR-USER>/$PROJECT_NAME:${CIRCLE_SHA1:0:7} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment