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

Variables cannot be resolved in "Projects to build" field when trigger is a post-build action

    Details

    • Similar Issues:

      Description

      This functionality was introduced in v2.9, via this issue: https://issues.jenkins-ci.org/browse/JENKINS-9391

      However, it only works if the trigger is a build action. The variable won't resolve if the trigger is a post-build action; instead, no builds get kicked off.

        Attachments

          Issue Links

            Activity

            Hide
            cjo9900 cjo9900 added a comment -

            I think you have hit the issue that has already been fixed in commit
            https://github.com/jenkinsci/parameterized-trigger-plugin/commit/16586248c382ef417e0aaa1d2cdb00baee87ec18
            which has not yet been released.
            Where the Environment variables are not correct, due to using the Dependancy Graph to trigger the downstream builds which always runs on master therefore does not get the correct env variables.

            Show
            cjo9900 cjo9900 added a comment - I think you have hit the issue that has already been fixed in commit https://github.com/jenkinsci/parameterized-trigger-plugin/commit/16586248c382ef417e0aaa1d2cdb00baee87ec18 which has not yet been released. Where the Environment variables are not correct, due to using the Dependancy Graph to trigger the downstream builds which always runs on master therefore does not get the correct env variables.
            Hide
            cjo9900 cjo9900 added a comment -

            Above comment is incorrect as I looked at this in more detail, and the problem is that because the plugin uses the DependancyGraph it creates the dependencies when the requested and at that point there are no build available so there the env variables cannot be replaced.

            DependancyGraph is only updated on modification to a job config (add, edit, copy,delete).

            To do this correctly the dependencies would need to be calculated during the build which is currently not supported by the core.

            Show
            cjo9900 cjo9900 added a comment - Above comment is incorrect as I looked at this in more detail, and the problem is that because the plugin uses the DependancyGraph it creates the dependencies when the requested and at that point there are no build available so there the env variables cannot be replaced. DependancyGraph is only updated on modification to a job config (add, edit, copy,delete). To do this correctly the dependencies would need to be calculated during the build which is currently not supported by the core.
            Hide
            cjo9900 cjo9900 added a comment -

            Core should provide a way of allowing temporary Dependencies to be added during a build, which are tied to a build not the main Dependency Graph.

            Show
            cjo9900 cjo9900 added a comment - Core should provide a way of allowing temporary Dependencies to be added during a build, which are tied to a build not the main Dependency Graph.
            Hide
            ikedam ikedam added a comment -

            Duplicates JENKINS-11280

            Show
            ikedam ikedam added a comment - Duplicates JENKINS-11280

              People

              • Assignee:
                cjo9900 cjo9900
                Reporter:
                mconlon Michael Conlon
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: