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

Trigger are always run after finalize

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We are currently trying to trigger a build as post action using parameters from a property file generated in the workspace during the build. As last post action the job uses the workspace cleanup plugin. The issue is that the cleanup is done before the triggering. Which leads to never trigger the sub build...

      So the following setting is the plugin doesn't make sense with the "Parameters from a property" option.
      https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/java/hudson/plugins/parameterizedtrigger/BuildTrigger.java#L41

      Would it be possible to change the returned value to false to the notifier gets executed in correct order...

        Attachments

          Activity

          Hide
          williambernardet William Bernardet added a comment -

          It makes sense to run this step after the build completed, then I think it is now more a ws-cleanup related issue.
          Anyway thanks for your support.

          Show
          williambernardet William Bernardet added a comment - It makes sense to run this step after the build completed, then I think it is now more a ws-cleanup related issue. Anyway thanks for your support.
          Hide
          williambernardet William Bernardet added a comment -

          Sorry for the hassle...
          But my initial analysis was wrong, the issue does not come from the needsToRunAfterFinalized, which is also part of the ws-cleanup plugin, but from the fact subprojects are triggered via Dependency graph. Those are triggered during AbstractBuild.cleanUp, and after the workspace is lease, so no file should be access from that point on the workspace. I would propose to have a step run during perform to record the context needed (a bit like it is currently done for the env, but generalized), and the ParameterizedDependency would just trigger the solved config.

          Show
          williambernardet William Bernardet added a comment - Sorry for the hassle... But my initial analysis was wrong, the issue does not come from the needsToRunAfterFinalized, which is also part of the ws-cleanup plugin, but from the fact subprojects are triggered via Dependency graph. Those are triggered during AbstractBuild.cleanUp, and after the workspace is lease, so no file should be access from that point on the workspace. I would propose to have a step run during perform to record the context needed (a bit like it is currently done for the env, but generalized), and the ParameterizedDependency would just trigger the solved config.
          Hide
          ndeloof Nicolas De Loof added a comment -

          Indeed, as the trigger is executed after workspace has been released, access to property files is not possible to collect parameters. So such a file need to be archived and retrieved as a build artifact.

          Show
          ndeloof Nicolas De Loof added a comment - Indeed, as the trigger is executed after workspace has been released, access to property files is not possible to collect parameters. So such a file need to be archived and retrieved as a build artifact.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          src/main/java/hudson/plugins/parameterizedtrigger/FileBuildParameters.java
          http://jenkins-ci.org/commit/parameterized-trigger-plugin/77355b70a0904a5fae3655dd2a63492b95d869b5
          Log:
          [FIXED JENKINS-25192] rely on archived artifacts to trigger (parameterized) build
          fallback to workspace for backward compatibility

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/plugins/parameterizedtrigger/FileBuildParameters.java http://jenkins-ci.org/commit/parameterized-trigger-plugin/77355b70a0904a5fae3655dd2a63492b95d869b5 Log: [FIXED JENKINS-25192] rely on archived artifacts to trigger (parameterized) build fallback to workspace for backward compatibility
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          src/main/java/hudson/plugins/parameterizedtrigger/FileBuildParameters.java
          http://jenkins-ci.org/commit/parameterized-trigger-plugin/2c782fd693e30dda3edb439c4b4ed41d82e6cbcb
          Log:
          Merge pull request #80 from jenkinsci/JENKINS-25192

          [FIXED JENKINS-25192] rely on archived artifacts

          Compare: https://github.com/jenkinsci/parameterized-trigger-plugin/compare/666e72e5a740...2c782fd693e3

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/plugins/parameterizedtrigger/FileBuildParameters.java http://jenkins-ci.org/commit/parameterized-trigger-plugin/2c782fd693e30dda3edb439c4b4ed41d82e6cbcb Log: Merge pull request #80 from jenkinsci/ JENKINS-25192 [FIXED JENKINS-25192] rely on archived artifacts Compare: https://github.com/jenkinsci/parameterized-trigger-plugin/compare/666e72e5a740...2c782fd693e3

            People

            • Assignee:
              huybrechts huybrechts
              Reporter:
              williambernardet William Bernardet
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: