Skip to content
Snippets Groups Projects
Commit 30ba7c5f authored by Rick Carback's avatar Rick Carback
Browse files

collapse setup and test phases

parent 4f463bfe
No related branches found
No related tags found
No related merge requests found
# From: https://about.gitlab.com/2017/09/21/how-to-create-ci-cd-pipeline-with-autodeploy-to-kubernetes-using-gitlab-and-helm/
cache:
untracked: true
key: "$CI_BUILD_REF_NAME"
paths:
- vendor/
variables:
REPO_DIR: gitlab.com/elixxir
REPO_NAME: client
DOCKER_IMAGE: golang:1.13.4-buster
DOCKER_IMAGE: elixxirlabs/cuda-go:latest
MIN_CODE_COVERAGE: "75"
before_script:
......@@ -28,39 +22,24 @@ before_script:
- git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/"
- export PATH=$HOME/go/bin:$PATH
- export GOPRIVATE=gitlab.com/elixxir/*
- go get -u github.com/ory/go-acc
stages:
- setup
- test
- build
- tag
- trigger_integration
- trigger_release_integration
setup:
stage: setup
test:
stage: test
image: $DOCKER_IMAGE
except:
- tags
script:
- git clean -ffdx
- go mod vendor -v
- go build ./...
- go mod tidy
artifacts:
paths:
- vendor/
test:
stage: test
image: $DOCKER_IMAGE
except:
- tags
script:
- apt-get update
- apt-get install bc -y
- mkdir -p testdata
# Test coverage
......@@ -76,6 +55,7 @@ test:
- (if [ "$CODE_CHECK" == "1" ]; then echo "Minimum coverage of $MIN_CODE_COVERAGE succeeded"; else echo "Minimum coverage of $MIN_CODE_COVERAGE failed"; exit 1; fi);
artifacts:
paths:
- vendor/
- testdata/
build:
......@@ -95,7 +75,7 @@ build:
- release/
tag:
stage: tag
stage: trigger_integration
only:
- master
image: $DOCKER_IMAGE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment