gilo/Jenkinsfile
Timothy J. Warren 060e3e841e
Some checks failed
timw4mail/gilo/pipeline/head There was a failure building this commit
Make it so Jenkins can actually build
2021-03-30 20:55:46 -04:00

31 lines
579 B
Groovy

pipeline {
agent {
docker {
image 'golang:latest'
args '--privileged'
}
}
environment {
GO114MODULE = 'on'
CGO_ENABLED = 0
GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}"
}
stages {
stage('Setup') {
steps {
sh "mkdir -p .cache/go-build"
sh "chmod 777 .cache/go-build"
}
}
stage('Build') {
steps {
sh "go build"
}
}
stage('Test') {
steps {
sh "go test ./... -v"
}
}
}
}