Hi all,
currently, I try building a Jenkins pipeline with the Docker Slave Plugin and the Pipeline Maven Integration Plugin.
My idea is that the Maven builds run inside a Docker container (enabled by Docker Slave Plugin) and I'd like to configure Maven with the Pipeline Maven Integration Plugin. My pipeline script looks like the following one.
pipeline {
agent any
stages {
stage ("build") {
steps {
dockerNode(image: 'reg/maven-build-container:latest', sideContainers: ['reg/postgres_build:latest']) {
git branch: env.BRANCH_NAME, credentialsId: 'jenkins-gitlab', poll: false, url: 'http://git-url.git'
withMaven(globalMavenSettingsConfig: '202cbecc-d109-4d9a-b2ea-10f10d1b90f4', jdk: 'JDK8_Docker', maven: 'Maven_Docker') {
sh "mvn deploy -DdeployAtEnd=true"
}
}
}
}
}
}
A multibranch-pipline-job executes this script.
Unfortunality, the build fails with
[Pipeline] withMaven
[withMaven] Options: []
[withMaven] Available options:
[withMaven] use JDK installation JDK8_Docker
Unpacking https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip to /home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_Docker on Container for Test-BP-Backend_feature_build » feature%2FBP-693 #9.14
[withMaven] use Maven installation 'Maven_Docker'
[withMaven] use Maven global settings provided by the Jenkins Managed Configuration File '202cbecc-d109-4d9a-b2ea-10f10d1b90f4'
[withMaven] use Maven global settings.xml '202cbecc-d109-4d9a-b2ea-10f10d1b90f4' with NO Maven servers credentials provided by Jenkins
[Pipeline] {
[Pipeline] sh
[eature_build_feature_BP-693-SIDHF47ZCQKUGCT2KJWECGHMTN5X5SPJD2DKKENGCWWDU74OWSXA] Running shell script
env: nohup: No such file or directory
[Pipeline] }
[Pipeline] // withMaven
[Pipeline] }
[Pipeline] // dockerNode
[Pipeline] }
[Pipeline] // stage
Is it possble, that withMaven inside of dockerNode isn't supported?
I'm pleased about each hints.
Best regards,
Sandra