Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31166

'ls' and 'mkdir' "not found" since v1.6.2

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Shell step

      env
      pwd
      ls -al
      
      mkdir -p ./.m2
      echo "<settings><localRepository>$(pwd)/.m2/repository</localRepository></settings>" >> ./.m2/settings.xml
      mvn -B -V -s ./.m2/settings.xml verify -Dselenium.host=127.0.0.1 -Dselenium.port=4444
      

      Failure output with Docker Custom Build Env 1.6.2

      Started by user admin
      Building remotely on 10.0.16.65 (built-in) in workspace /path/to/slave_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium
       > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > git config remote.origin.url https://github.com/wakaleo/game-of-life.git # timeout=10
      Fetching upstream changes from https://github.com/wakaleo/game-of-life.git
       > git --version # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/wakaleo/game-of-life.git +refs/heads/*:refs/remotes/origin/*
       > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
       > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
      Checking out Revision 18051323061c9d96d348a71113bde562441a0ca8 (refs/remotes/origin/master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f 18051323061c9d96d348a71113bde562441a0ca8
       > git rev-list 18051323061c9d96d348a71113bde562441a0ca8 # timeout=10
      Docker container f15c6088c38746413a8d182dc10b763019542f2ea2f294c2ec9c3bb05f74c516 started to host the build
      $ docker exec --tty f15c6088c38746413a8d182dc10b763019542f2ea2f294c2ec9c3bb05f74c516 env
      [03-game-of-life-maven-docker-image-maven-selenium] $ docker exec --tty --user 1000: f15c6088c38746413a8d182dc10b763019542f2ea2f294c2ec9c3bb05f74c516 env BUILD_DISPLAY_NAME="#5" BUILD_ID="5" BUILD_NUMBER="5" BUILD_TAG="jenkins-cloudbees-03-game-of-life-maven-docker-image-maven-selenium-5" BUILD_URL="http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/5/" CLASSPATH="" DISPLAY=":99.0" EXECUTOR_NUMBER="0" GIT_BRANCH="origin/master" GIT_COMMIT="18051323061c9d96d348a71113bde562441a0ca8" GIT_PREVIOUS_COMMIT="18051323061c9d96d348a71113bde562441a0ca8" GIT_URL="https://github.com/wakaleo/game-of-life.git" HOME="/home/jenkins" HOSTNAME="f15c6088c387" HUDSON_HOME="/path/to/jenkins_home" HUDSON_SERVER_COOKIE="62fd6f9c0ddae4d0" HUDSON_URL="http://jenkins-0.example.com/" JENKINS_HOME="/path/to/jenkins_home" JENKINS_SERVER_COOKIE="62fd6f9c0ddae4d0" JENKINS_URL="http://jenkins-0.example.com/" JOB_NAME="cloudbees/03-game-of-life-maven-docker-image-maven-selenium" JOB_URL="http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/" MAVEN_HOME="/usr/share/maven" MAVEN_VERSION="3.3.3" 'NODE_LABELS="10.0.16.65 (built-in)"' 'NODE_NAME="10.0.16.65 (built-in)"' PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" SCREEN_DEPTH="24" SCREEN_HEIGHT="1020" SCREEN_WIDTH="1360" TERM="xterm" WORKSPACE="/path/to/slave_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium" /bin/sh -xe /path/to/slave_dir/tmp/hudson5755977114733588067.sh
      + env
      JENKINS_HOME="/path/to/jenkins_home"
      HOSTNAME="f15c6088c387"
      GIT_COMMIT="18051323061c9d96d348a71113bde562441a0ca8"
      HUDSON_URL="http://jenkins-0.example.com/"
      NODE_LABELS="10.0.16.65 (built-in)"
      HOME="/home/jenkins"
      BUILD_URL="http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/5/"
      JENKINS_SERVER_COOKIE="62fd6f9c0ddae4d0"
      MAVEN_HOME="/usr/share/maven"
      SCREEN_HEIGHT="1020"
      WORKSPACE="/path/to/slave_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium"
      NODE_NAME="10.0.16.65 (built-in)"
      EXECUTOR_NUMBER="0"
      GIT_BRANCH="origin/master"
      TERM="xterm"
      BUILD_DISPLAY_NAME="#5"
      HUDSON_HOME="/path/to/jenkins_home"
      PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      SCREEN_DEPTH="24"
      BUILD_ID="5"
      BUILD_TAG="jenkins-cloudbees-03-game-of-life-maven-docker-image-maven-selenium-5"
      DISPLAY=":99.0"
      JENKINS_URL="http://jenkins-0.example.com/"
      GIT_URL="https://github.com/wakaleo/game-of-life.git"
      JOB_URL="http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/"
      BUILD_NUMBER="5"
      HUDSON_SERVER_COOKIE="62fd6f9c0ddae4d0"
      MAVEN_VERSION="3.3.3"
      CLASSPATH=""
      JOB_NAME="cloudbees/03-game-of-life-maven-docker-image-maven-selenium"
      SCREEN_WIDTH="1360"
      PWD=/path/to/slave_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium
      GIT_PREVIOUS_COMMIT="18051323061c9d96d348a71113bde562441a0ca8"
      + pwd
      /path/to/slave_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium
      + ls -al
      /path/to/slave_dir/tmp/hudson5755977114733588067.sh: 4: /path/to/slave_dir/tmp/hudson5755977114733588067.sh: ls: not found
      Build step 'Execute shell' marked build as failure
      Stopping Docker container after build completion
      Finished: FAILURE
      

      Successful output with Docker Custom Build Env 1.6.1

      Started by user admin
      Building remotely on 10.0.16.65 (built-in) in workspace /path/to/slave_root_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium
       > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > git config remote.origin.url https://github.com/wakaleo/game-of-life.git # timeout=10
      Fetching upstream changes from https://github.com/wakaleo/game-of-life.git
       > git --version # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/wakaleo/game-of-life.git +refs/heads/*:refs/remotes/origin/*
       > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
       > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
      Checking out Revision 18051323061c9d96d348a71113bde562441a0ca8 (refs/remotes/origin/master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f 18051323061c9d96d348a71113bde562441a0ca8
       > git rev-list 18051323061c9d96d348a71113bde562441a0ca8 # timeout=10
      Docker container ea3a3662f629f2ccd0edb7790768d47d763cf0c61e95fcd0e164cd519082c478 started to host the build
      [03-game-of-life-maven-docker-image-maven-selenium] $ docker exec --tty --user 1000: ea3a3662f629f2ccd0edb7790768d47d763cf0c61e95fcd0e164cd519082c478 env BUILD_CONTAINER_ID=ea3a3662f629f2ccd0edb7790768d47d763cf0c61e95fcd0e164cd519082c478 BUILD_DISPLAY_NAME=#6 BUILD_ID=6 BUILD_NUMBER=6 BUILD_TAG=jenkins-cloudbees-03-game-of-life-maven-docker-image-maven-selenium-6 BUILD_URL=http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/6/ CLASSPATH= DOCKER_HOST=unix:///var/vcap/sys/run/docker/docker.sock EXECUTOR_NUMBER=0 GIT_BRANCH=origin/master GIT_COMMIT=18051323061c9d96d348a71113bde562441a0ca8 GIT_PREVIOUS_COMMIT=18051323061c9d96d348a71113bde562441a0ca8 GIT_URL=https://github.com/wakaleo/game-of-life.git HOME=/home/vcap HUDSON_HOME=/path/to/jenkins_home HUDSON_SERVER_COOKIE=62fd6f9c0ddae4d0 HUDSON_URL=http://jenkins-0.example.com/ JAVA_OPTS=-Djava.io.tmpdir=/path/to/slave_root_dir/tmp JENKINS_HOME=/path/to/jenkins_home JENKINS_SERVER_COOKIE=62fd6f9c0ddae4d0 JENKINS_URL=http://jenkins-0.example.com/ JOB_NAME=cloudbees/03-game-of-life-maven-docker-image-maven-selenium JOB_URL=http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/ LANG=en_US.UTF-8 LOGNAME=vcap MAIL=/var/mail/vcap NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat "NODE_LABELS=10.0.16.65 (built-in)" "NODE_NAME=10.0.16.65 (built-in)" OLDPWD=/home/vcap PATH=/var/vcap/packages/ruby/bin:/var/vcap/packages/remote_syslog/bin:/var/vcap/packages/openjdk-8/bin:/var/vcap/packages/maven/bin:/var/vcap/packages/git/bin:/var/vcap/packages/docker/sbin:/var/vcap/packages/docker/bin:/var/vcap/packages/cloudfoundry-cli/bin:/var/vcap/packages/buildpacks/bin:/var/vcap/packages/ruby/bin:/var/vcap/packages/remote_syslog/bin:/var/vcap/packages/openjdk-8/bin:/var/vcap/packages/maven/bin:/var/vcap/packages/git/bin:/var/vcap/packages/docker/sbin:/var/vcap/packages/docker/bin:/var/vcap/packages/cloudfoundry-cli/bin:/var/vcap/packages/buildpacks/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD=/path/to/slave_root_dir SHELL=/bin/bash SHLVL=1 "SSH_CLIENT=10.0.16.64 58287 22" "SSH_CONNECTION=10.0.16.64 58287 10.0.16.65 22" TMP=/path/to/slave_root_dir/tmp TMPDIR=/path/to/slave_root_dir/tmp USER=vcap WORKSPACE=/path/to/slave_root_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt _=/var/vcap/packages/openjdk-8/bin/java /bin/sh -xe /path/to/slave_root_dir/tmp/hudson7337963948957150194.sh
      + env
      JENKINS_HOME=/path/to/jenkins_home
      MAIL=/var/mail/vcap
      SSH_CLIENT=10.0.16.64 58287 22
      USER=vcap
      HOSTNAME=ea3a3662f629
      GIT_COMMIT=18051323061c9d96d348a71113bde562441a0ca8
      NODE_LABELS=10.0.16.65 (built-in)
      SHLVL=1
      HUDSON_URL=http://jenkins-0.example.com/
      HOME=/home/vcap
      OLDPWD=/home/vcap
      BUILD_URL=http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/6/
      JENKINS_SERVER_COOKIE=62fd6f9c0ddae4d0
      MAVEN_HOME=/usr/share/maven
      SCREEN_HEIGHT=1020
      WORKSPACE=/path/to/slave_root_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium
      BUILD_CONTAINER_ID=ea3a3662f629f2ccd0edb7790768d47d763cf0c61e95fcd0e164cd519082c478
      TMPDIR=/path/to/slave_root_dir/tmp
      LOGNAME=vcap
      NODE_NAME=10.0.16.65 (built-in)
      _=/var/vcap/packages/openjdk-8/bin/java
      EXECUTOR_NUMBER=0
      GIT_BRANCH=origin/master
      TERM=xterm
      BUILD_DISPLAY_NAME=#6
      HUDSON_HOME=/path/to/jenkins_home
      PATH=/var/vcap/packages/ruby/bin:/var/vcap/packages/remote_syslog/bin:/var/vcap/packages/openjdk-8/bin:/var/vcap/packages/maven/bin:/var/vcap/packages/git/bin:/var/vcap/packages/docker/sbin:/var/vcap/packages/docker/bin:/var/vcap/packages/cloudfoundry-cli/bin:/var/vcap/packages/buildpacks/bin:/var/vcap/packages/ruby/bin:/var/vcap/packages/remote_syslog/bin:/var/vcap/packages/openjdk-8/bin:/var/vcap/packages/maven/bin:/var/vcap/packages/git/bin:/var/vcap/packages/docker/sbin:/var/vcap/packages/docker/bin:/var/vcap/packages/cloudfoundry-cli/bin:/var/vcap/packages/buildpacks/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
      SCREEN_DEPTH=24
      BUILD_ID=6
      BUILD_TAG=jenkins-cloudbees-03-game-of-life-maven-docker-image-maven-selenium-6
      JAVA_OPTS=-Djava.io.tmpdir=/path/to/slave_root_dir/tmp
      DISPLAY=:99.0
      LANG=en_US.UTF-8
      JENKINS_URL=http://jenkins-0.example.com/
      GIT_URL=https://github.com/wakaleo/game-of-life.git
      JOB_URL=http://jenkins-0.example.com/job/03-game-of-life-maven-docker-image-maven-selenium/
      TMP=/path/to/slave_root_dir/tmp
      BUILD_NUMBER=6
      SHELL=/bin/bash
      XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
      HUDSON_SERVER_COOKIE=62fd6f9c0ddae4d0
      MAVEN_VERSION=3.3.3
      DOCKER_HOST=unix:///var/vcap/sys/run/docker/docker.sock
      CLASSPATH=
      NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
      JOB_NAME=cloudbees/03-game-of-life-maven-docker-image-maven-selenium
      SCREEN_WIDTH=1360
      PWD=/path/to/slave_root_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium
      SSH_CONNECTION=10.0.16.64 58287 10.0.16.65 22
      GIT_PREVIOUS_COMMIT=18051323061c9d96d348a71113bde562441a0ca8
      + pwd
      /path/to/slave_root_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium
      + ls -al
      total 68
      drwxrwxr-x 8 jenkins jenkins  4096 Oct 23 12:20 .
      drwxrwxr-x 6 jenkins jenkins  4096 Oct 23 12:21 ..
      drwxrwxr-x 8 jenkins jenkins  4096 Oct 26 09:35 .git
      -rw-rw-r-- 1 jenkins jenkins   138 Oct 23 12:20 .gitignore
      -rw-rw-r-- 1 jenkins jenkins  3059 Oct 23 12:20 README.markdown
      drwxrwxr-x 3 jenkins jenkins  4096 Oct 23 12:20 gameoflife-acceptance-tests
      drwxrwxr-x 3 jenkins jenkins  4096 Oct 23 12:20 gameoflife-build
      drwxrwxr-x 7 jenkins jenkins  4096 Oct 23 12:20 gameoflife-core
      drwxrwxr-x 2 jenkins jenkins  4096 Oct 23 12:20 gameoflife-deploy
      drwxrwxr-x 4 jenkins jenkins  4096 Oct 23 12:20 gameoflife-web
      -rw-rw-r-- 1 jenkins jenkins    50 Oct 23 12:20 infinitest.filters
      -rw-rw-r-- 1 jenkins jenkins 22302 Oct 23 12:20 pom.xml
      + mkdir -p ./.m2
      + pwd
      + echo <settings><localRepository>/path/to/slave_root_dir/workspace/03-game-of-life-maven-docker-image-maven-selenium/.m2/repository</localRepository></settings>
      + mvn -B -V -s ./.m2/settings.xml verify -Dselenium.host=127.0.0.1 -Dselenium.port=4444
      ...
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vincent Latombe
          Path:
          src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java
          http://jenkins-ci.org/commit/docker-custom-build-environment-plugin/fff2c4f3205cb5cb1942c0764ebef819bc8f40df
          Log:
          JENKINS-31166 Extra quotes messes up with environment variables
          content

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java http://jenkins-ci.org/commit/docker-custom-build-environment-plugin/fff2c4f3205cb5cb1942c0764ebef819bc8f40df Log: JENKINS-31166 Extra quotes messes up with environment variables content
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vincent Latombe
          Path:
          src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java
          http://jenkins-ci.org/commit/docker-custom-build-environment-plugin/8912bbd2a71f09cad5158c6cb0861f60dfa6f0ed
          Log:
          Merge pull request #35 from Vlatombe/JENKINS-31166

          JENKINS-31166 Extra quotes messes up with environment variables content

          Compare: https://github.com/jenkinsci/docker-custom-build-environment-plugin/compare/493ec0d67e56...8912bbd2a71f

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java http://jenkins-ci.org/commit/docker-custom-build-environment-plugin/8912bbd2a71f09cad5158c6cb0861f60dfa6f0ed Log: Merge pull request #35 from Vlatombe/ JENKINS-31166 JENKINS-31166 Extra quotes messes up with environment variables content Compare: https://github.com/jenkinsci/docker-custom-build-environment-plugin/compare/493ec0d67e56...8912bbd2a71f
          Hide
          vlatombe Vincent Latombe added a comment -

          Fixed in 1.6.3

          Show
          vlatombe Vincent Latombe added a comment - Fixed in 1.6.3

            People

            • Assignee:
              vlatombe Vincent Latombe
              Reporter:
              cleclerc Cyrille Le Clerc
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: