Files
golang-test/Jenkinsfile
Mpho raf 2505e83019
All checks were successful
ci-tests/golang-test/pipeline/head This commit looks good
allow go modules auto loading
2022-02-06 10:54:35 +02:00

15 lines
360 B
Groovy

/* Requires the Docker Pipeline plugin */
/* Scripted pipeline */
def enVars = '-e XDG_CACHE_HOME="/tmp" -e CGO_ENABLED=0 -e GOCACHE="/tmp/.cache" -e GO111MODULE=auto'
node {
checkout scm
stage('Build') {
docker.image('golang').inside(enVars) {
sh 'mkdir -pv ${GOCACHE}'
sh 'go version'
sh 'go test -v -short'
}
}
}