mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Generalize CI variables
Signed-off-by: Kevin Klues <kklues@nvidia.com>
This commit is contained in:
parent
4448319605
commit
1791372f22
@ -11,9 +11,13 @@ stages:
|
|||||||
rules:
|
rules:
|
||||||
- when: always
|
- when: always
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GITHUB_ROOT: "github.com/NVIDIA"
|
||||||
|
PROJECT_GOPATH: "${GITHUB_ROOT}/nvidia-container-toolkit"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p ${GOPATH}/src/github.com/NVIDIA/
|
- mkdir -p ${GOPATH}/src/${GITHUB_ROOT}
|
||||||
- ln -s ${CI_PROJECT_DIR} ${GOPATH}/src/github.com/NVIDIA/${CI_PROJECT_NAME}
|
- ln -s ${CI_PROJECT_DIR} ${GOPATH}/src/${PROJECT_GOPATH}
|
||||||
|
|
||||||
.build-setup: &build-setup
|
.build-setup: &build-setup
|
||||||
image: docker:19.03.8
|
image: docker:19.03.8
|
||||||
@ -34,19 +38,19 @@ lint:
|
|||||||
stage: tests
|
stage: tests
|
||||||
script:
|
script:
|
||||||
- go get -u golang.org/x/lint/golint
|
- 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:
|
vet:
|
||||||
<<: *tests-setup
|
<<: *tests-setup
|
||||||
stage: tests
|
stage: tests
|
||||||
script:
|
script:
|
||||||
- go vet github.com/NVIDIA/${CI_PROJECT_NAME}/pkg
|
- go vet ${PROJECT_GOPATH}/pkg
|
||||||
|
|
||||||
unit_test:
|
unit_test:
|
||||||
<<: *tests-setup
|
<<: *tests-setup
|
||||||
stage: tests
|
stage: tests
|
||||||
script:
|
script:
|
||||||
- go test github.com/NVIDIA/${CI_PROJECT_NAME}/pkg
|
- go test ${PROJECT_GOPATH}/pkg
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
<<: *tests-setup
|
<<: *tests-setup
|
||||||
|
Loading…
Reference in New Issue
Block a user