diff options
author | Simon Knox <psimyn@gmail.com> | 2017-08-09 21:17:15 +1000 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2017-08-09 21:17:15 +1000 |
commit | 0cb88374cea8d7b907b40ae223b34f5b946d0100 (patch) | |
tree | 31164bd9c18979ccdd25430bf70534a4bc6ab464 /vendor/gitlab-ci-yml/Go.gitlab-ci.yml | |
parent | 142403ac738d47fe29c28d50f01a9fcffe139748 (diff) | |
download | gitlab-ce-0cb88374cea8d7b907b40ae223b34f5b946d0100.tar.gz |
update gitignores and licenses - generated by bin/rake gitlab:update_templatesupdate-gitignore-9-5
Diffstat (limited to 'vendor/gitlab-ci-yml/Go.gitlab-ci.yml')
-rw-r--r-- | vendor/gitlab-ci-yml/Go.gitlab-ci.yml | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/vendor/gitlab-ci-yml/Go.gitlab-ci.yml b/vendor/gitlab-ci-yml/Go.gitlab-ci.yml index e23b6e212f0..8a214352d2a 100644 --- a/vendor/gitlab-ci-yml/Go.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Go.gitlab-ci.yml @@ -1,14 +1,19 @@ image: golang:latest +variables: + # Please edit to your GitLab project + REPO_NAME: gitlab.com/namespace/project + # The problem is that to be able to use go get, one needs to put # the repository in the $GOPATH. So for example if your gitlab domain -# is mydomainperso.com, and that your repository is repos/projectname, and +# is gitlab.com, and that your repository is namespace/project, and # the default GOPATH being /go, then you'd need to have your -# repository in /go/src/mydomainperso.com/repos/projectname +# repository in /go/src/gitlab.com/namespace/project # Thus, making a symbolic link corrects this. before_script: - - ln -s /builds /go/src/mydomainperso.com - - cd /go/src/mydomainperso.com/repos/projectname + - mkdir -p $GOPATH/src/$REPO_NAME + - ln -svf $CI_PROJECT_DIR/* $GOPATH/src/$REPO_NAME + - cd $GOPATH/src/$REPO_NAME stages: - test @@ -17,21 +22,14 @@ stages: format: stage: test script: - # Add here all the dependencies, or use glide/govendor to get - # them automatically. - # - curl https://glide.sh/get | sh - - go get github.com/alecthomas/kingpin - - go tool vet -composites=false -shadow=true *.go - - go test -race $(go list ./... | grep -v /vendor/) + - go fmt $(go list ./... | grep -v /vendor/) + - go vet $(go list ./... | grep -v /vendor/) + - go test -race $(go list ./... | grep -v /vendor/) compile: stage: build script: - # Add here all the dependencies, or use glide/govendor/... - # to get them automatically. - - go get github.com/alecthomas/kingpin - # Better put this in a Makefile - - go build -race -ldflags "-extldflags '-static'" -o mybinary + - go build -race -ldflags "-extldflags '-static'" -o mybinary artifacts: - paths: - - mybinary + paths: + - mybinary |