Skip to content

Instantly share code, notes, and snippets.

@codesword
Last active August 20, 2016 18:23
Show Gist options
  • Save codesword/258e6c0cb5cca7a7af876eb3706cd8a8 to your computer and use it in GitHub Desktop.
Save codesword/258e6c0cb5cca7a7af876eb3706cd8a8 to your computer and use it in GitHub Desktop.
machine:
services:
- docker
environment:
GOPATH: /home/ubuntu/.go_workspace
IMPORT_PATH: github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
general:
build_dir: ../.go_workspace/src/$IMPORT_PATH
checkout:
post:
- mkdir -p "$GOPATH/src/$IMPORT_PATH"
- rsync -azC --delete $HOME/$CIRCLE_PROJECT_REPONAME/ $GOPATH/src/$IMPORT_PATH/
dependencies:
pre:
- go get github.com/tools/godep # if using godep to manage dependencies
override:
- godep restore # if using godep to manage dependencies
test:
override:
- go test
deployment:
prod:
branch: master
commands:
- heroku plugins:install heroku-container-registry
- heroku container:login
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o artifact .
- heroku container:push web --app name-of-heroku-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment