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">
                  <arg value="-jar jenkins-cli.jar -s 
http://localhost:8080/jenkins/ build 'foo' -s" />
                </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.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/22f2409d-4dc7-475b-918b-d586d199884b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to