Need advice on (auto) adding a Maven installation from my CD pipeline with Docker

34 views
Skip to first unread message

Olivier Liechti

unread,
Mar 12, 2016, 6:50:36 AM3/12/16
to Jenkins Users
Hello,

I am building a pipeline and I am trying to build on top of the official Jenkins Docker image. What I have already managed to do is to add a list of custom plugins and to install a custom job. I am now trying to use the pipeline plugin and to implement basic steps. In all the examples I have found, there is a snippet like this:

   // Get the maven tool.
   // ** NOTE: This 'M3' maven tool must be configured
   // **       in the global configuration.
   def mvnHome = tool 'M3'

   // Mark the code build 'stage'....
   stage 'Build'
   // Run the maven build
   sh "${mvnHome}/bin/mvn clean install"

The assumption is that the maven configuration has been added to the Jenkins installation. That's easy to do via the UI, but what if I want to automate that process? I haven't found any documentation or example so far.

Any idea?

Many thanks and best regards,

Olivier
Reply all
Reply to author
Forward
0 new messages