|
Downstream project name is not accepting env variable/build parameters
---------------------------------------------------------------------- Key: JENKINS-11280 URL: https://issues.jenkins-ci.org/browse/JENKINS-11280 Project: Jenkins Issue Type: Bug Components: parameterized-trigger Reporter: Eby Peters Assignee: huybrechts I am using Parametrized trigger to trigger downstream build projects. All our build projects are named as <NAme>_<release>. The Release name is set as a build parameter. So in the project name field of when I enter name_${PARAMETER} its not triggering the right project. See screenshot attached -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.jenkins-ci.org/browse/JENKINS-11280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eby Peters updated JENKINS-11280: --------------------------------- Attachment: screenshot-1.jpg > Downstream project name is not accepting env variable/build parameters > ---------------------------------------------------------------------- > > Key: JENKINS-11280 > URL: https://issues.jenkins-ci.org/browse/JENKINS-11280 > Project: Jenkins > Issue Type: Bug > Components: parameterized-trigger > Reporter: Eby Peters > Assignee: huybrechts > Attachments: screenshot-1.jpg > > > I am using Parametrized trigger to trigger downstream build projects. All our build projects are named as <NAme>_<release>. The Release name is set as a build parameter. So in the project name field of when I enter name_${PARAMETER} its not triggering the right project. > See screenshot attached -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-11280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155132#comment-155132 ] Fred G commented on JENKINS-11280: ---------------------------------- Looked at this issue in detail, here is what I found out: * Env variables/build parameters are in fact not expanded, even though *hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getProjectList(EnvVars)* supports expanding. The reason for this is, that the Parameterized-Trigger plugin uses the dependency graph to set the downstream jobs (only past Jenkins 1.341). * *hudson.plugins.parameterizedtrigger.BuildTrigger.buildDependencyGraph(AbstractProject, DependencyGraph)* is not called during an actual build. It's only called when a new project is created from xml, a project configuration is saved or a project gets deleted (and a few other events). During these events there are no env vars or build parameters around (obviously), therefore getProjectList() is called with null as parameter. * *hudson.tasks.BuildTrigger* (the simple downstream trigger in Jenkins core) has no support for variables expansion at all *Possible solutions:* * check if project list contains variables, if it does, either ** use the deprecated *hudson.plugins.parameterizedtrigger.BuildTrigger.perform(AbstractBuild<?, ?>, Launcher, BuildListener)* to execute those downstream jobs or ** rebuild the dependency graph dynamically during a build In both cases dynamically expanded downstream jobs could probably not be shown as sensible links on the job overview page. Maybe the unexpanded string could be shown with a note that it's computed during a build. Should the use-case be supported in general? If yes, how should it be displayed outside of the configuration page? If yes, what's an elegant way of implementing the functionality? > Downstream project name is not accepting env variable/build parameters > ---------------------------------------------------------------------- > > Key: JENKINS-11280 > URL: https://issues.jenkins-ci.org/browse/JENKINS-11280 > Project: Jenkins > Issue Type: Bug > Components: parameterized-trigger > Reporter: Eby Peters > Assignee: huybrechts > Attachments: screenshot-1.jpg > > > I am using Parametrized trigger to trigger downstream build projects. All our build projects are named as <NAme>_<release>. The Release name is set as a build parameter. So in the project name field of when I enter name_${PARAMETER} its not triggering the right project. > See screenshot attached -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
[ https://issues.jenkins-ci.org/browse/JENKINS-11280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fred G reassigned JENKINS-11280: -------------------------------- Assignee: Kohsuke Kawaguchi (was: huybrechts) Assigning this to you, as huybrechts is MIA. > Downstream project name is not accepting env variable/build parameters > ---------------------------------------------------------------------- > > Key: JENKINS-11280 > URL: https://issues.jenkins-ci.org/browse/JENKINS-11280 > Project: Jenkins > Issue Type: Bug > Components: parameterized-trigger > Reporter: Eby Peters > Assignee: Kohsuke Kawaguchi > Attachments: screenshot-1.jpg > > > I am using Parametrized trigger to trigger downstream build projects. All our build projects are named as <NAme>_<release>. The Release name is set as a build parameter. So in the project name field of when I enter name_${PARAMETER} its not triggering the right project. > See screenshot attached -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by JIRA noreply@jenkins-ci.org
|
|||||||||||
|
In reply to this post by JIRA noreply@jenkins-ci.org
|
|||||||||||
|
In reply to this post by JIRA noreply@jenkins-ci.org
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
|||||||||||
| Powered by Nabble | Edit this page |

Please fix this bug - I need this fixed so I can fully use parameters in my jobs and not have to hardcode variable stuff directly in parameterized trigger fields.