node { env.GOROOT="${tool 'go'}" env.PATH="${env.GOROOT}/bin:${env.PATH}" stage('Build') { sh 'go build' } stage('Test') { sh 'go test' } }