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

Don't record dependencies to self-generated artifacts

      cleclerc:

      The PipelineGraphPublisher currently also records dependencies to artifacts which have been generated by a pipeline itself. This leads to problems with multibranch pipelines, because then different branches will keep triggering each other if they depend on artifacts that they themselves generate.

      Therefore, it might make sense to exclude dependencies to self-generated artifacts.

          [JENKINS-47996] Don't record dependencies to self-generated artifacts

          Cyrille Le Clerc added a comment - Released in 3.2.0-alpha-1, feedback welcome. https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/pipeline-maven/3.2.0-alpha-1/pipeline-maven-3.2.0-alpha-1.hpi

          markusdlugi friendly ping, could you test?

          Cyrille Le Clerc added a comment - markusdlugi friendly ping, could you test?

          rhierlmeier added a comment -

          I stumbled also over the same problem (see https://groups.google.com/forum/#!topic/jenkinsci-users/X9RdBHl0BII).
          I will test the 3.2.0-alpha-1 in my test environment. I will give you feedback on Monday.

          rhierlmeier added a comment - I stumbled also over the same problem (see https://groups.google.com/forum/#!topic/jenkinsci-users/X9RdBHl0BII ). I will test the 3.2.0-alpha-1 in my test environment. I will give you feedback on Monday.

          Thanks rhierlmeier

          Cyrille Le Clerc added a comment - Thanks rhierlmeier

          rhierlmeier added a comment -

          My test of 3.2.0-alpha-1 was successful. I have a maven multimodule project that is integrated via the "Bitbuckt Team/Project" plugin into Jenkins. In my productive environment (with maven-pipeline-plugin 3.0.7) I get an infinite build loop when creating a new feature branch for the project (because two branches build the same artifact version).

          I installed 3.2.0-alpha-1 on my test Jenkins and intregrated the same project. The infinite build loop does no longer occur.

          rhierlmeier added a comment - My test of 3.2.0-alpha-1 was successful. I have a maven multimodule project that is integrated via the "Bitbuckt Team/Project" plugin into Jenkins. In my productive environment (with maven-pipeline-plugin 3.0.7) I get an infinite build loop when creating a new feature branch for the project (because two branches build the same artifact version). I installed 3.2.0-alpha-1 on my test Jenkins and intregrated the same project. The infinite build loop does no longer occur.

          rhierlmeier added a comment -

          When will 3.2.0 be released?

          rhierlmeier added a comment - When will 3.2.0 be released?

          Markus Dlugi added a comment -

          rhierlmeier Thanks for the test.

          cleclerc As already mentioned, I have been running this on our production environment for some time now. I didn't notice any issues regarding this feature. However, I noticed one thing which could be improved with regard to JENKINS-46313.

          Markus Dlugi added a comment - rhierlmeier Thanks for the test. cleclerc As already mentioned, I have been running this on our production environment for some time now. I didn't notice any issues regarding this feature. However, I noticed one thing which could be improved with regard to JENKINS-46313 .

          Cyrille Le Clerc added a comment - - edited

          > When will 3.2.0 be released?

          rhierlmeier my laptop was being repaired, I'll get it back tomorrow and I'll be able to release.

          > However, I noticed one thing which could be improved with regard to JENKINS-46313.

          markusdlugi what is this thing please? Release blocker to cut 3.2.0?

          Cyrille Le Clerc added a comment - - edited > When will 3.2.0 be released? rhierlmeier my laptop was being repaired, I'll get it back tomorrow and I'll be able to release. > However, I noticed one thing which could be improved with regard to JENKINS-46313 . markusdlugi what is this thing please? Release blocker to cut 3.2.0?

          3.2.0 is released

          Cyrille Le Clerc added a comment - 3.2.0 is released

          markusdlugi, rhierlmeier we are introducing a change in the way we prevent triggering side branches of multi-module projects. We revisited this code because thorsten_langer_sla reported JENKINS-54515 and because we have more flexibility to query the database now that we support MySQL as a backend in addition to H2.

          • Would you mind testing the beta version 3.6.4-beta-1 https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.4-beta-1
          • To verify, please enable logs org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener at the FINE level and see message such as
            [withMaven] downstreamPipelineTriggerRunListener - Skip triggering my-multi-jar-project » PR-1 for 
            MavenArtifact{com.example.multi-jar:shared-core:jar:0.0.1-SNAPSHOT(version: 0.0.1-20181202.224248-35, snapshot:true) } 
            because it generates artifact with same groupId:artifactId 
            MavenArtifact{com.example.multi-jar:shared-core:jar:0.0.1-20181202.224107-34(version: 0.0.1-SNAPSHOT, snapshot:true) }
            
          • Please ensure that you use a MySQL database instead of the embedded H2 database as documented in "Using a MySQL Database"

          To download 3.6.4-beta-1: https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.4-beta-1

          Cyrille Le Clerc added a comment - markusdlugi , rhierlmeier we are introducing a change in the way we prevent triggering side branches of multi-module projects. We revisited this code because thorsten_langer_sla reported JENKINS-54515 and because we have more flexibility to query the database now that we support MySQL as a backend in addition to H2. Would you mind testing the beta version 3.6.4-beta-1 https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.4-beta-1 To verify, please enable logs org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener at the FINE level and see message such as [withMaven] downstreamPipelineTriggerRunListener - Skip triggering my-multi-jar-project » PR-1 for MavenArtifact{com.example.multi-jar:shared-core:jar:0.0.1-SNAPSHOT(version: 0.0.1-20181202.224248-35, snapshot:true) } because it generates artifact with same groupId:artifactId MavenArtifact{com.example.multi-jar:shared-core:jar:0.0.1-20181202.224107-34(version: 0.0.1-SNAPSHOT, snapshot:true) } Please ensure that you use a MySQL database instead of the embedded H2 database as documented in " Using a MySQL Database " To download 3.6.4-beta-1: https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.4-beta-1

            markusdlugi Markus Dlugi
            markusdlugi Markus Dlugi
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: