We're using Jenkins 2 on an Ubuntu 14.04 box and I'm trying out the new Jenkinsfile stuff... something like this:
node('docker') {
stage "Prepare environment"
checkout scm
docker.image('geerlingguy/docker-ubuntu1604-ansible:latest').inside{
stage('Syntax Check') {
sh 'whoami'
sh 'echo $HOME'
sh 'ansible-playbook $PWD/tests/test.yml --syntax-check'
}
}
}
When Jenkins goes to run the "whoami" command, I can see the command it did was:
docker run -t -d -u 1003:1003
The user ID of the Jenkins user on this machine is 1003, but I'm not sure why it would be outputting that by default. Is there a way to turn it off?