Does Docker Slave Plugin support Pipeline Maven Integration Plugin?

53 views
Skip to first unread message

Sandra Parsick

unread,
Nov 2, 2017, 8:40:37 AM11/2/17
to Jenkins Users

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

nicolas de loof

unread,
Nov 2, 2017, 3:21:43 PM11/2/17
to jenkins...@googlegroups.com
I can't tell, best to give it a try and report any issue you encounter doing this.

Le 2 nov. 2017 1:41 PM, "'Sandra Parsick' via Jenkins Users" <jenkins...@googlegroups.com> a écrit :

...

Dan Tran

unread,
Nov 3, 2017, 8:28:36 AM11/3/17
to Jenkins Users

Sandra Parsick

unread,
Nov 3, 2017, 9:07:36 AM11/3/17
to Jenkins Users
Thank you for your hint.
Reply all
Reply to author
Forward
0 new messages