Skip to content

Instantly share code, notes, and snippets.

@mleko
Last active April 29, 2017 17:17
Show Gist options
  • Save mleko/d1d20899dac62200bdccbb05e7924ca8 to your computer and use it in GitHub Desktop.
Save mleko/d1d20899dac62200bdccbb05e7924ca8 to your computer and use it in GitHub Desktop.
Gitlab CI setup using docker image
image: golang:latest
stages:
- build
- test
before_script:
- go get github.com/tools/godep
- mkdir -p /go/src/gitlab.com
- cp -r /builds/$CI_PROJECT_NAMESPACE /go/src/gitlab.com/
- cd /go/src/gitlab.com/$CI_PROJECT_PATH
- "[ -d Godeps ] || godep save"
build:
stage: build
tags:
- docker
script:
- godep restore
- godep go build
test:
stage: test
tags:
- docker
script:
- godep restore
- godep go test -v -cover ./...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment