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

Threshold to trigger downstream pipelines only if a Maven lifecycle phase has been executed (deploy or install or package)

    Details

    • Similar Issues:

      Description

      Add a threshold to only trigger downstream pipelines if the generated artifact has been deployed ("mvn deploy") or if has at least been installed ("mvn install" or "mvn deploy") or if it has been at least packaged ("mvn package" or "mvn verify" or "mvn install" or "mvn deploy").

      In many cases, if a generated maven artifact has just been packaged (mvn package) or installed locally (mvn install), then we don't want to trigger downstream pipelines that have a maven dependency on this generated artifact.

      Solution implemented

      Add a Maven Lifecycle Phase threshold to trigger downstream pipelines ("package", "install", "deploy"). By default, withMaven will only trigger if the "deploy" lifecycle phase has been reached.

        Attachments

          Issue Links

            Activity

            cleclerc Cyrille Le Clerc created issue -
            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/PipelineGraphPublisher.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/e431bd8a85a96f535aa00bd1ed95bbd65099737a
            Log:
            JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install"

            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/PipelineGraphPublisher.java http://jenkins-ci.org/commit/pipeline-maven-plugin/e431bd8a85a96f535aa00bd1ed95bbd65099737a Log: JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install"
            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/PipelineGraphPublisher.java
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-multi-module.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml
            http://jenkins-ci.org/commit/pipeline-maven-plugin/f73418a3f4948f2c7709107dcfac637c465463ce
            Log:
            JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install"

            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/PipelineGraphPublisher.java jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-multi-module.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml http://jenkins-ci.org/commit/pipeline-maven-plugin/f73418a3f4948f2c7709107dcfac637c465463ce Log: JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install"
            cleclerc Cyrille Le Clerc made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            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/PipelineGraphPublisher.java
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-multi-module.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml
            http://jenkins-ci.org/commit/pipeline-maven-plugin/270f0c7169464ec8ca4b12d1a5a668eace7631e5
            Log:
            JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install" (#96)

            JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install"

            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/PipelineGraphPublisher.java jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-multi-module.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml http://jenkins-ci.org/commit/pipeline-maven-plugin/270f0c7169464ec8ca4b12d1a5a668eace7631e5 Log: JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install" (#96) JENKINS-46511 Option to only trigger downstream pipelines when the generated artifact has been "mvn deploy", not "mvn package" or "mvn install"
            Hide
            cleclerc Cyrille Le Clerc added a comment - - edited

            First batch merged, still a GUI to provide for the configuration flag

            Show
            cleclerc Cyrille Le Clerc added a comment - - edited First batch merged, still a GUI to provide for the configuration flag
            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/PipelineGraphPublisher.java
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
            jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/config.jelly
            jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/help-lifecycleThreshold.html
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/DependencyGraphTest.java
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-package-jar.xml
            maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractExecutionHandler.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/509c09cce18728b7a9702798b328ee11dac08f76
            Log:
            JENKINS-46511 Only trigger downstream pipelines if maven builds reach a threshold lifecycle phase.
            The default minimum lifecycle phase is "deploy", can be configured to trigger downstream pipeline on "install" or on "package"

            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/PipelineGraphPublisher.java jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/config.jelly jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/help-lifecycleThreshold.html jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/DependencyGraphTest.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-package-jar.xml maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractExecutionHandler.java http://jenkins-ci.org/commit/pipeline-maven-plugin/509c09cce18728b7a9702798b328ee11dac08f76 Log: JENKINS-46511 Only trigger downstream pipelines if maven builds reach a threshold lifecycle phase. The default minimum lifecycle phase is "deploy", can be configured to trigger downstream pipeline on "install" or on "package"
            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/PipelineGraphPublisher.java
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
            jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/config.jelly
            jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/help-lifecycleThreshold.html
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/DependencyGraphTest.java
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-package-jar.xml
            maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractExecutionHandler.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/83a7ad30f80abba6a7b626bbbe4565438178a382
            Log:
            Merge pull request #98 from jenkinsci/JENKINS-46511

            JENKINS-46511 Only trigger downstream pipelines if maven builds reach a threshold lifecycle phase

            Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/85f712dfeab6...83a7ad30f80a

            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/PipelineGraphPublisher.java jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/config.jelly jenkins-plugin/src/main/resources/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher/help-lifecycleThreshold.html jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/DependencyGraphTest.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-deploy-jar.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-nexus-deploy-release.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/maven-spy-package-jar.xml maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractExecutionHandler.java http://jenkins-ci.org/commit/pipeline-maven-plugin/83a7ad30f80abba6a7b626bbbe4565438178a382 Log: Merge pull request #98 from jenkinsci/ JENKINS-46511 JENKINS-46511 Only trigger downstream pipelines if maven builds reach a threshold lifecycle phase Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/85f712dfeab6...83a7ad30f80a
            cleclerc Cyrille Le Clerc made changes -
            Description Option to only trigger downstream pipelines if the generated artifact has been deployed (mvn deploy) ant not if the generated artifact has just been packaged or installed (mvn package or mvn install).

             

            In many cases, if a generated maven artifact has just been packaged (mvn package) or installed locally (mvn install), then we don't want to trigger downstream pipelines that have a maven dependency on this generated artifact.
            Option to only trigger downstream pipelines if the generated artifact has been deployed (mvn deploy) ant not if the generated artifact has just been packaged or installed (mvn package or mvn install).

             

            In many cases, if a generated maven artifact has just been packaged (mvn package) or installed locally (mvn install), then we don't want to trigger downstream pipelines that have a maven dependency on this generated artifact.

            h2. Solution implemented

            Add a Maven Lifecycle Phase threshold to trigger downstream pipelines ("package", "install", "deploy"). By default, withMaven will only trigger if the "deploy" lifecycle phase has been reached.


             !image-2017-09-27-22-55-33-216.png|thumbnail!
            Attachment image-2017-09-27-22-55-33-216.png [ 39876 ]
            cleclerc Cyrille Le Clerc made changes -
            Link This issue is related to JENKINS-46807 [ JENKINS-46807 ]
            cleclerc Cyrille Le Clerc made changes -
            Link This issue is related to JENKINS-46355 [ JENKINS-46355 ]
            cleclerc Cyrille Le Clerc made changes -
            Summary Option to only trigger downstream pipelines if the generated artifact has been deployed, not installed Threshold to trigger downstream pipelines only if a Maven lifecycle phase has been executed (deploy or install or package)
            cleclerc Cyrille Le Clerc made changes -
            Description Option to only trigger downstream pipelines if the generated artifact has been deployed (mvn deploy) ant not if the generated artifact has just been packaged or installed (mvn package or mvn install).

             

            In many cases, if a generated maven artifact has just been packaged (mvn package) or installed locally (mvn install), then we don't want to trigger downstream pipelines that have a maven dependency on this generated artifact.

            h2. Solution implemented

            Add a Maven Lifecycle Phase threshold to trigger downstream pipelines ("package", "install", "deploy"). By default, withMaven will only trigger if the "deploy" lifecycle phase has been reached.


             !image-2017-09-27-22-55-33-216.png|thumbnail!
            Add a threshold to only trigger downstream pipelines if the generated artifact has been deployed ("mvn deploy") or if has at least been installed ("mvn install" or "mvn deploy") or if it has been at least packaged ("mvn package" or "mvn verify" or "mvn install" or "mvn deploy").

            In many cases, if a generated maven artifact has just been packaged (mvn package) or installed locally (mvn install), then we don't want to trigger downstream pipelines that have a maven dependency on this generated artifact.

            h2. Solution implemented

            Add a Maven Lifecycle Phase threshold to trigger downstream pipelines ("package", "install", "deploy"). By default, withMaven will only trigger if the "deploy" lifecycle phase has been reached.


             !image-2017-09-27-22-55-33-216.png|thumbnail!
            Show
            cleclerc Cyrille Le Clerc added a comment - - edited Solved in https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/pipeline-maven/3.0.1-beta-1/pipeline-maven-3.0.1-beta-1.hpi
            cleclerc Cyrille Le Clerc made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            v3.0.1

            Show
            cleclerc Cyrille Le Clerc added a comment - v3.0.1
            cleclerc Cyrille Le Clerc made changes -
            Status In Review [ 10005 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                cleclerc Cyrille Le Clerc
                Reporter:
                cleclerc Cyrille Le Clerc
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: