I managed to get it working by including the cd
in the same sh
statement:
docker.image('nalbion/go-web-build:latest') .inside("-v ${env.WORKSPACE}:/workspace/src/bitbucket.org/nalbion/go-demo " + "-e GOPATH=/usr/lib/go_appengine/gopath:/workspace") { sh """ cd /workspace/src/bitbucket.org/nalbion/go-demo go vet ./src/... goapp test ./... """ }