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