From 291d46c9e874d9be7e05683b1ead0d239b1415c9 Mon Sep 17 00:00:00 2001 From: Valentin Hristev <valentin.hristev@vereign.com> Date: Thu, 16 Aug 2018 12:46:11 +0200 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e1e252..6132a7f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,28 +1,21 @@ stages: - build - + build: stage: build image: golang:1.10.3 before_script: - - mkdir -p ~/.ssh - - echo -e "$MY_KEY" > ~/.ssh/id_rsa - - chmod 600 ~/.ssh/id_rsa - - which ssh-agent - - eval $(ssh-agent -s) - - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - - ssh-add ~/.ssh/id_rsa + - ssh-keyscan code.vereign.com >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts - git config --global url."ssh://git@code.vereign.com".insteadOf https://code.vereign.com - - export PATH=$PATH:/home/gitlab-runner/go/bin - export GOPATH="/home/gitlab-runner/go" - - echo $GOPATH - - rm -rf $GOPATH/pkg + - export GOROOT="/usr/local/go" + - export PATH=$PATH:/home/gitlab-runner/go/bin:/usr/local/go/bin + - rm -rf $GOPATH/pkg Gopkg.lock vendor - cd $GOPATH/src - mkdir -p code.vereign.com/$CI_PROJECT_NAMESPACE - cd code.vereign.com/$CI_PROJECT_NAMESPACE - cp -rf $CI_PROJECT_DIR $CI_PROJECT_NAME - cd $CI_PROJECT_NAME - - go env - script: - - go get -u github.com/golang/dep/cmd/dep - - sudo make \ No newline at end of file + script: + - make \ No newline at end of file -- GitLab