github.com/creichlin/pentaconta@v0.1.1-0.20170602155716-6b53e3be0bdb/.gitlab-ci.yml (about) 1 2 variables: 3 REPO_NAME: gitlab.com/creichlin/pentaconta 4 5 stages: 6 - test 7 - build 8 - deploy 9 10 test-project: 11 image: golang:1.8 12 stage: test 13 script: 14 - go get github.com/tools/godep 15 - mkdir -p $GOPATH/src/$REPO_NAME 16 - mv $CI_PROJECT_DIR/* $GOPATH/src/$REPO_NAME 17 - cd $GOPATH/src/$REPO_NAME 18 - godep restore 19 - go install gitlab.com/creichlin/pentaconta/testservices/... 20 - godep go test ./... 21 22 build-project: 23 image: golang:1.8 24 stage: build 25 script: 26 - go get github.com/tools/godep 27 - mkdir -p $GOPATH/src/$REPO_NAME 28 - mv $CI_PROJECT_DIR/* $GOPATH/src/$REPO_NAME/ 29 - cd $GOPATH/src/$REPO_NAME 30 - godep restore 31 - mkdir -p $CI_PROJECT_DIR/artifacts 32 - godep go build -o $CI_PROJECT_DIR/artifacts/pentaconta 33 artifacts: 34 paths: 35 - artifacts/pentaconta 36 37 deploy-project: 38 image: cgswong/aws 39 stage: deploy 40 script: 41 - aws s3 cp artifacts/pentaconta s3://omg-repository/pentaconta-latest --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers