Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49896

Support integration-test goal for the Invoker Publisher

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: pipeline-maven-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.89.4
      Pipeline Maven Plugin 3.3.2
    • Similar Issues:

      Description

      The InvokerRunsPublisher is currently only considering the run goal of the Invoker Plugin in order to launch the MavenInvokerRecorder. However, integration tests with the Invoker Plugin can also be launched with the integration-test goal, and later verified independently with the verify goal. (This is for example the current setup used by Maven team.) In this case, the current publisher will not do anything.

      Therefore, support should be added for this goal. I'm not sure if it should/can be checked whether both integration-test and verify have ran during the build for the same project/module. I think only adding integration-test here is enough.

        Attachments

          Issue Links

            Activity

            Hide
            cleclerc Cyrille Le Clerc added a comment -

            We should try to mimic what we have done in org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher handling both "maven-surefire-plugin:test" and "maven-failsafe-plugin:integration-test".

            See https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.3.2/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/JunitTestsPublisher.java

            Show
            cleclerc Cyrille Le Clerc added a comment - We should try to mimic what we have done in org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher handling both " maven-surefire-plugin:test " and " maven-failsafe-plugin:integration-test ". See https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.3.2/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/JunitTestsPublisher.java
            Show
            cleclerc Cyrille Le Clerc added a comment - We will need a sample maven-event-spy log file similar to https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.4.2/jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-tests.xml
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisher.java
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisherTest.java
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-test.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-tests.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-run.xml
            http://jenkins-ci.org/commit/pipeline-maven-plugin/2d4516db0b27763841a61a81525a1b7432ca6609
            Log:
            JENKINS-49896 Add support for invoker:integration-test in addition to invoker:run

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisher.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisherTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-test.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-tests.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-run.xml http://jenkins-ci.org/commit/pipeline-maven-plugin/2d4516db0b27763841a61a81525a1b7432ca6609 Log: JENKINS-49896 Add support for invoker:integration-test in addition to invoker:run
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            benoit guerin & Guillaume Boué could you please have a look?

            Can you especially have a look at the test maven-spy-log file https://github.com/jenkinsci/pipeline-maven-plugin/blob/2d4516db0b27763841a61a81525a1b7432ca6609/jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-test.xml ?

            I am not familiar with the invoker plugin, I hope I didn't make a misunderstanding.

            Show
            cleclerc Cyrille Le Clerc added a comment - benoit guerin & Guillaume Boué could you please have a look? Can you especially have a look at the test maven-spy-log file https://github.com/jenkinsci/pipeline-maven-plugin/blob/2d4516db0b27763841a61a81525a1b7432ca6609/jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-test.xml ? I am not familiar with the invoker plugin, I hope I didn't make a misunderstanding.
            Hide
            gboue Guillaume Boué added a comment -

            +1 The changes look good to me

            Show
            gboue Guillaume Boué added a comment - +1 The changes look good to me
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisher.java
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisherTest.java
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-test.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-tests.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-run.xml
            http://jenkins-ci.org/commit/pipeline-maven-plugin/89d846f5ca95766242b91a18476e7ae3dcefedfb
            Log:
            Merge pull request #132 from jenkinsci/JENKINS-49896

            JENKINS-49896 Add support for invoker:integration-test in addition …

            Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/421d8c0f292e...89d846f5ca95

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisher.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisherTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-test.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-integration-tests.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-maven-invoker-plugin-run.xml http://jenkins-ci.org/commit/pipeline-maven-plugin/89d846f5ca95766242b91a18476e7ae3dcefedfb Log: Merge pull request #132 from jenkinsci/ JENKINS-49896 JENKINS-49896 Add support for invoker:integration-test in addition … Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/421d8c0f292e...89d846f5ca95
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Fixed in pipeline-maven 3.4.3

            Show
            cleclerc Cyrille Le Clerc added a comment - Fixed in pipeline-maven 3.4.3

              People

              • Assignee:
                cleclerc Cyrille Le Clerc
                Reporter:
                gboue Guillaume Boué
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: