pipeline { agent { docker { image 'golang:latest' args '--privileged' } } stages { stage('Setup') { steps { sh "mkdir .cache" sh "chmod 777 .cache" } } stage('Build') { steps { sh "go build" } } stage('Test') { steps { sh "go test ./... -v" } } } }