allow go modules auto loading
All checks were successful
ci-tests/golang-test/pipeline/head This commit looks good
All checks were successful
ci-tests/golang-test/pipeline/head This commit looks good
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -1,13 +1,13 @@
|
|||||||
/* Requires the Docker Pipeline plugin */
|
/* Requires the Docker Pipeline plugin */
|
||||||
/* Scripted pipeline */
|
/* Scripted pipeline */
|
||||||
def enVars = '-e XDG_CACHE_HOME="/tmp" -e CGO_ENABLED=0 -e GOCACHE="/tmp/.cache"'
|
def enVars = '-e XDG_CACHE_HOME="/tmp" -e CGO_ENABLED=0 -e GOCACHE="/tmp/.cache" -e GO111MODULE=auto'
|
||||||
|
|
||||||
node {
|
node {
|
||||||
checkout scm
|
checkout scm
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
docker.image('golang').inside(enVars) {
|
docker.image('golang').inside(enVars) {
|
||||||
sh 'go version'
|
|
||||||
sh 'mkdir -pv ${GOCACHE}'
|
sh 'mkdir -pv ${GOCACHE}'
|
||||||
|
sh 'go version'
|
||||||
sh 'go test -v -short'
|
sh 'go test -v -short'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user