I have a pipeline which does a maven build. During the integration test phase I invoke another Jenkins job.
Is there a way to expose parts of the build process while I'm inside a Maven build?
// Jenkinsfile
node {
stage(‘Compile’) {
sh ‘mvn clean install’
}
}
// pom.xml
…
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<configuration>
<target>
<exec executable="java">
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
...
Instead of this:
Stage View:
Compile -> End
I would like to see:
Stage View:
Compile -> Integration Test -> End
And so I would like to somehow communicate to Jenkins, from within the pom file, that I am in another stage.