-
Bug
-
Resolution: Fixed
-
Major
-
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,
- continue to use the Docker Pipeline Plugin 1.13
- or specify the maven settings files using the Config File Provider Plugin
- or use pipeline-maven:3.0.3-beta-2 adapting the "PATH" environment variable or using Takari's Maven wrapper as described on the release notes
References
- is duplicated by
-
JENKINS-47805 withMaven doesn't copy settings.xml to Docker container
-
- Closed
-
-
JENKINS-47804 Setting "mavenLocalRepo" to ".repository" creates a "$WORKSPACE/?/.m2/repository" folder
-
- Closed
-
- is related to
-
JENKINS-48050 Replace Declarative Docker agent directive with new implementation
-
- In Progress
-
-
JENKINS-48284 pipeline-maven 3.0.3 update issues with certain maven plugins.
-
- Open
-
-
JENKINS-40484 Unable to use withMaven() step inside docker container for old versions of Docker
-
- Reopened
-
joshtrow I understand what you say.
The problem that we discovered with docker-pipeline up to 1.13 is that it overwrites the "PATH" of the Docker container by the "PATH" of the underlying agent. There could have a huge mess with a RHEL/Centos agent launching a debian based Docker image...
We are still brainstorming to reduce the impact of the fix brought by docker-pipeline:1.14. In the meantime, I would recommend to stick to docker-pipeline
I have a few questions please