Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/templates/Go.gitlab-ci.yml')
-rw-r--r--lib/gitlab/ci/templates/Go.gitlab-ci.yml20
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/gitlab/ci/templates/Go.gitlab-ci.yml b/lib/gitlab/ci/templates/Go.gitlab-ci.yml
index 19e4ffdbe1e..bd8e1020c4e 100644
--- a/lib/gitlab/ci/templates/Go.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Go.gitlab-ci.yml
@@ -5,21 +5,6 @@
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 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/gitlab.com/namespace/project
-# Thus, making a symbolic link corrects this.
-before_script:
- - mkdir -p "$GOPATH/src/$(dirname $REPO_NAME)"
- - ln -svf "$CI_PROJECT_DIR" "$GOPATH/src/$REPO_NAME"
- - cd "$GOPATH/src/$REPO_NAME"
-
stages:
- test
- build
@@ -35,7 +20,8 @@ format:
compile:
stage: build
script:
- - go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/mybinary
+ - mkdir -p mybinaries
+ - go build -o mybinaries ./...
artifacts:
paths:
- - mybinary
+ - mybinaries