pipeline { agent { docker { image 'golang:latest' args '--privileged' } } 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" } } } }