Skip to content

Commit

Permalink
Merge branch 'upstream-fix-ci' into 'master'
Browse files Browse the repository at this point in the history
Generalize CI variables

See merge request nvidia/container-toolkit/container-toolkit!17
  • Loading branch information
klueska committed Jul 24, 2020
2 parents 4448319 + 1791372 commit bf342fb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ stages:
rules:
- when: always

variables:
GITHUB_ROOT: "github.com/NVIDIA"
PROJECT_GOPATH: "${GITHUB_ROOT}/nvidia-container-toolkit"

before_script:
- mkdir -p ${GOPATH}/src/github.com/NVIDIA/
- ln -s ${CI_PROJECT_DIR} ${GOPATH}/src/github.com/NVIDIA/${CI_PROJECT_NAME}
- mkdir -p ${GOPATH}/src/${GITHUB_ROOT}
- ln -s ${CI_PROJECT_DIR} ${GOPATH}/src/${PROJECT_GOPATH}

.build-setup: &build-setup
image: docker:19.03.8
Expand All @@ -34,19 +38,19 @@ lint:
stage: tests
script:
- go get -u golang.org/x/lint/golint
- golint -set_exit_status github.com/NVIDIA/${CI_PROJECT_NAME}/pkg
- golint -set_exit_status ${PROJECT_GOPATH}/pkg

vet:
<<: *tests-setup
stage: tests
script:
- go vet github.com/NVIDIA/${CI_PROJECT_NAME}/pkg
- go vet ${PROJECT_GOPATH}/pkg

unit_test:
<<: *tests-setup
stage: tests
script:
- go test github.com/NVIDIA/${CI_PROJECT_NAME}/pkg
- go test ${PROJECT_GOPATH}/pkg

fmt:
<<: *tests-setup
Expand Down

0 comments on commit bf342fb

Please sign in to comment.