-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
Jenkins ver. 2.87, Docker Pipeline plugin 1.14
After updating the Docker Pipeline plugin from 1.13 to 1.14 our builds started failing on the deploy phase, with an error that they cannot authenticate with the repository:
** 11:35:25 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project [project]: Failed to deploy artifacts: Could not transfer artifact [artifact] from/to [snapshot repository]
The credentials for that repository are in the maven settings.xml, which is defined under the 'configfiles' settings provided by the Configuration File Provider plugin. Here's a trimmed-down view of the relevant section from the Jenkinsfile library that all jobs call into:
... def mavenImage = docker.image([jenkins image]) mavenImage.pull() mavenImage.inside('--net=host -v /var/run/docker.sock:/var/run/docker.sock:rw -v /home/jenkins/.m2/repository:/home/jenkins/.m2/repository:rw') { withMaven(maven: MAVEN_INSTALLATION, mavenSettingsConfig: MAVEN_SETTINGS, options: getMavenOpts()) { sh 'mvn clean deploy ...' ... } } ...
Seems like the settings.xml defined in the Configuration File Provider plugin might not be honored the same way it was before updating. Is there something that we should do to update our Jenkinsfiles/library to be compatible with the new plugin?
If you need any more information, let me know. Rolling the plugin back to 1.13 did get the builds running again for now, but ideally I would like to stay up-to-date with the latest.
- duplicates
-
JENKINS-47805 withMaven doesn't copy settings.xml to Docker container
- Closed
- is related to
-
JENKINS-40484 Unable to use withMaven() step inside docker container for old versions of Docker
- Reopened