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

withMaven fails to inject Maven settings files with docker-pipeline 1.14

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline-maven-plugin
    • None
    • pipeline-maven-plugin 2.x+
      docker-pipeline plugin 1.14

      Problem Description

      The docker-pipeline changed its behavior with version 1.14 and is no longer allowing plugins to contribute the "PATH" environment variable.

      The Pipeline Maven Plugin contributes to the PATH environment variable to specify the "mvn" command line arguments such as the settings file.

      Due to this change of behavior, the Pipeline Maven Plugin is no longer able to inject specify Maven settings file.

      Workaround

      If you need to specify the Maven settings file in a dockerized build agent using the Docker Pipeline Plugin,

      References

      https://github.com/jenkinsci/docker-workflow-plugin/commit/f55c122fe10f28bf31ccfca66f0587facf508148#diff-4d69c729a160747eba5c12ea83f7753cR248

      https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.0.2/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java#L279

          [JENKINS-47823] withMaven fails to inject Maven settings files with docker-pipeline 1.14

          Cyrille Le Clerc created issue -
          Cyrille Le Clerc made changes -
          Link New: This issue is related to JENKINS-40484 [ JENKINS-40484 ]
          Cyrille Le Clerc made changes -
          Link New: This issue is duplicated by JENKINS-47805 [ JENKINS-47805 ]
          Cyrille Le Clerc made changes -
          Assignee Original: Alvaro Lobato [ alobato ] New: Cyrille Le Clerc [ cleclerc ]

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/bfe173baf37face565e7edfc9bf4faf78392739a
          Log:
          JENKINS-47823 Add warning for docker-pipeline incompatibility + export MAVEN_CONFIG + export MVN_CMD

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java http://jenkins-ci.org/commit/pipeline-maven-plugin/bfe173baf37face565e7edfc9bf4faf78392739a Log: JENKINS-47823 Add warning for docker-pipeline incompatibility + export MAVEN_CONFIG + export MVN_CMD

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/5fc03e78b2e9f7427422575e0c901ad1095f8489
          Log:
          JENKINS-47823 Add warning for docker-pipeline incompatibility + export MAVEN_CONFIG + export MVN_CMD

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java http://jenkins-ci.org/commit/pipeline-maven-plugin/5fc03e78b2e9f7427422575e0c901ad1095f8489 Log: JENKINS-47823 Add warning for docker-pipeline incompatibility + export MAVEN_CONFIG + export MVN_CMD

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
          jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/c16068a952810405452389f9374c5256d7169628
          Log:
          JENKINS-47823 workaround a bug in environment variable handling

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java http://jenkins-ci.org/commit/pipeline-maven-plugin/c16068a952810405452389f9374c5256d7169628 Log: JENKINS-47823 workaround a bug in environment variable handling
          Cyrille Le Clerc made changes -
          Summary Original: withMaven fails to inject Maven settings files with docker-piepline 1.14 New: withMaven fails to inject Maven settings files with docker-pipeline 1.14

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
          jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/c7d85c5291603ecff2c721f2255e18d9b9175a4e
          Log:
          JENKINS-47823 Make withMaven compatible with docker-pipeline:1.14 (#108)

          JENKINS-47823 Add warning for docker-pipeline incompatibility + export MAVEN_CONFIG + export MVN_CMD

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java http://jenkins-ci.org/commit/pipeline-maven-plugin/c7d85c5291603ecff2c721f2255e18d9b9175a4e Log: JENKINS-47823 Make withMaven compatible with docker-pipeline:1.14 (#108) JENKINS-47823 Add warning for docker-pipeline incompatibility + export MAVEN_CONFIG + export MVN_CMD

          Cyrille Le Clerc added a comment - Beta release available https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.0.3-beta-1

            cleclerc Cyrille Le Clerc
            cleclerc Cyrille Le Clerc
            Votes:
            2 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: