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

Unable to use withMaven() step inside docker container for old versions of Docker

    Details

    • Similar Issues:

      Description

      I'm not able to use withMaven step inside docker container.

      [Pipeline] withMaven
      $ docker exec ffff env printenv MAVEN_HOME
      $ docker exec ffff env printenv M2_HOME
      $ docker exec ffff env /bin/sh -c "which mvn"
      Using maven exec: /opt/apache-maven-3.3.9/bin/mvn
      Using global settings config with name MavenGlobal
      Replacing all maven server entries not found in credentials list is false
      [Pipeline] {
      [Pipeline] sh
      
      [test-XXX] Running shell script
      nohup: failed to run command `sh': No such file or directory
      
      [Pipeline] }
      [Pipeline] // withMaven

      My Jenkinsfile pipeline:

      node('docker') {
          stage('Checkout') {
              checkout scm
          }
          buildInDocker('linux') {
              stage('Maven') {
                  withMaven(globalMavenSettingsConfig: '11111111-2222-3333-4444-555555555555') {
                          sh 'mvn clean test'
                  }
              }
          }
      }

      It looks like PATH env gets overwritten.

        Attachments

          Issue Links

            Activity

            testuser7 Test User created issue -
            dantran dan tran made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Critical [ 2 ]
            dantran dan tran made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            dantran dan tran made changes -
            Attachment image-2017-03-07-12-58-37-245.png [ 36322 ]
            dantran dan tran made changes -
            Attachment image-2017-03-07-12-58-37-245.png [ 36322 ]
            dantran dan tran made changes -
            Link This issue relates to JENKINS-41204 [ JENKINS-41204 ]
            dantran dan tran made changes -
            Attachment support_2017-04-22_18.28.56.zip [ 37302 ]
            cleclerc Cyrille Le Clerc made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Assignee Alvaro Lobato [ alobato ] Cyrille Le Clerc [ cleclerc ]
            Resolution Cannot Reproduce [ 5 ]
            dantran dan tran made changes -
            Resolution Cannot Reproduce [ 5 ]
            Status Closed [ 6 ] Reopened [ 4 ]
            cleclerc Cyrille Le Clerc made changes -
            Summary Unable to use withMaven step inside docker container Unable to use withMaven() step inside docker container for old versions of Docker
            dantran dan tran made changes -
            Attachment Capture.PNG [ 38674 ]
            jamesdumay James Dumay made changes -
            Labels blue-pipeline-scrub
            cleclerc Cyrille Le Clerc made changes -
            Link This issue is related to JENKINS-41339 [ JENKINS-41339 ]
            cleclerc Cyrille Le Clerc made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 17646 ]
            ncosta Nuno Costa made changes -
            ncosta Nuno Costa made changes -
            abayer Andrew Bayer made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            nv035674 Nathan Vahrenberg made changes -
            Link This issue is related to JENKINS-47809 [ JENKINS-47809 ]
            cleclerc Cyrille Le Clerc made changes -
            Link This issue is related to JENKINS-47823 [ JENKINS-47823 ]
            timdowney Tim Downey made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jamesdumay James Dumay made changes -
            Link This issue relates to JENKINS-48050 [ JENKINS-48050 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal CD-206 (Web Link)" [ 18982 ]
            allan_burdajewicz Allan BURDAJEWICZ made changes -
            Link This issue relates to JENKINS-43590 [ JENKINS-43590 ]
            aheritier Arnaud Héritier made changes -
            Assignee Cyrille Le Clerc [ cleclerc ]

              People

              • Assignee:
                Unassigned
                Reporter:
                testuser7 Test User
              • Votes:
                12 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated: