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

Artifacts deployed by deploy-file goal don't trigger downstream builds

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • pipeline-maven-3.11.0

      When artifacts get deployed by direct plugin invocation of the deploy:deploy-file goal the artifacts get recognized by the maven-spy but wont trigger downstream dependencies of deployed artifacts.

      This is because direct plugin invocation effectively skips the maven lifecycle. With no lifecycle known, the lifecycleThreshold is never met and downstream dependencies never get triggered.

      I have tried to fix this by creating a new ExecutionHandler for the JenkinsMavenEventSpy wich checks if the MojoExecution of the goal org.apache.maven.plugins:maven-deploy-plugin:deploy-file contains a lifecycle. When no lifecycle is present it assumes the deploy-Lifecycle.

      With this is place downstream-Dependencies get triggered even when the artifacts get deployed by the deploy:deploy-file goal directly.

      I've submitted a Pull-Request with my changes.

       

          [JENKINS-67507] Artifacts deployed by deploy-file goal don't trigger downstream builds

          René Schleusner created issue -
          René Schleusner made changes -
          Summary Original: artifacts deployed by deploy-file goal aren't picked up New: Artifacts deployed by deploy-file goal won't trigger downstream builds
          René Schleusner made changes -
          Summary Original: Artifacts deployed by deploy-file goal won't trigger downstream builds New: Artifacts deployed by deploy-file goal don't trigger downstream builds
          René Schleusner made changes -
          Description Original: When artifacts get deployed by direct plugin invocation of the {{deploy:deploy-file}} goal the artifacts get recognized by the maven-spy but wont trigger downstream dependencies of deployed artifacts.

          This is because direct plugin invocation effectively skips the maven lifecycle. With no lifecycle known, the lifecycleThreshold is never met and downstream dependencies never get triggered.

          I have tried to fix this by creating a new {{ExecutionHandler}} for the {{JenkinsMavenEventSpy}} wich checks if the {{MojoExecution}} of the goal {{org.apache.maven.plugins:maven-deploy-plugin:deploy-file}} contains a lifecycle. When no lifecycle is present it assumes the {{deploy}}-Lifecycle.

          With this is place downstream-Dependencies get triggered even when the artifacts get deployed by the {{deploy:deploy-file}} goal directly.

          I've created a fork and pushed [a branch with my changes|https://github.com/Schleuse/pipeline-maven-plugin/tree/trigger-downstream-of-deploy-file].

           
          New: When artifacts get deployed by direct plugin invocation of the {{deploy:deploy-file}} goal the artifacts get recognized by the maven-spy but wont trigger downstream dependencies of deployed artifacts.

          This is because direct plugin invocation effectively skips the maven lifecycle. With no lifecycle known, the lifecycleThreshold is never met and downstream dependencies never get triggered.

          I have tried to fix this by creating a new {{ExecutionHandler}} for the {{JenkinsMavenEventSpy}} wich checks if the {{MojoExecution}} of the goal {{org.apache.maven.plugins:maven-deploy-plugin:deploy-file}} contains a lifecycle. When no lifecycle is present it assumes the {{deploy}}-Lifecycle.

          With this is place downstream-Dependencies get triggered even when the artifacts get deployed by the {{deploy:deploy-file}} goal directly.

          I've submitted a [Pull-Request with my changes|https://github.com/jenkinsci/pipeline-maven-plugin/pull/398].

           
          Benoit made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Benoit made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Benoit made changes -
          Assignee New: Benoit [ bguerin ]
          Benoit made changes -
          Remote Link New: This issue links to "Pull request 398 (Web Link)" [ 27326 ]
          Benoit made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]
          Benoit made changes -
          Released As New: pipeline-maven-3.11.0

            bguerin Benoit
            schleuse René Schleusner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: