Jenkinsfile docker run outputting Jenkins user UID

68 views
Skip to first unread message

nwa...@rednovalabs.com

unread,
Nov 8, 2016, 6:09:20 PM11/8/16
to Jenkins Users
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?
Reply all
Reply to author
Forward
0 new messages