Quantcast

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
Issue Type: Bug Bug
Affects Versions: current
Assignee: Timothy Bingaman
Components: ivy, parameterized-trigger
Created: 30/Aug/12 9:04 PM
Description:

If you the parameterized trigger plugin with an Ivy Project although the downstream project triggers paramters are not passed. I converted my project to a regular free style softwarae project and it works. I'm trying to pass the build number to a downstream project.

Environment: Scientic linux
Project: Jenkins
Priority: Major Major
Reporter: Darren Rowley
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
Change By: Darren Rowley (30/Aug/12 9:05 PM)
Description: If you  use  the parameterized trigger plugin with an Ivy Project although the downstream project triggers paramters are not passed. I converted my project to a regular free style  softwarae  software  project and it works. I'm trying to pass the build number to a downstream project. 
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Darren Rowley (30/Aug/12 9:12 PM)
Environment: Scientic linux  (RHEL binary compatible)
Description: If you use the parameterized trigger plugin with an Ivy Project although the downstream project triggers paramters are not passed. I converted my project to a regular free style software project and it works. I'm trying to pass the build number to a downstream project.    

note: I am used the "predefined paramters" option (2 params) in the parameterized trigger if this makes a difference.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Not sure if it is related, but someone else added something to the Ivy Plugin related to parameters a while back.

In the Ivy Project configuration, go to the Ivy Module Configuration section, expand the bottom-most Advanced section, and check the Use parameters from upstream builds. See if that does anything for you and let me know how it goes.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Thanks for the quick response Timothy we tried this still doesn't work, even the hard coded predefined parameters don't get sent through...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

So what is the exact setup that is failing? You have one Ivy Project that is triggering another Ivy Project? Or an Ivy Project that is triggering a Freestyle Project?

And what exactly do you have in the predefined parameters box?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Yes an Ivy project triggering a free style project:

Exact steps to reproduce (success and failure cases below):
1. Create a new free style software job called 'target'
a) add a build stop called execute shell and make it simply execute:
echo $value1 $value2
2. Create a new free style software job called 'source'
a) add a build step that does anything
b) In post build actions choose "Trigger parameterized builds on other projects"
projects to build "target"
trigger when build is "Stable"
Predefined parameters
value1=hello
value2=$BUILD_NUMBER

3. (success case) Now when you run the job 'source' you should see something like this in the console of the 'target':
+ echo hello 25
hello 25
Finished: SUCCESS

4. Create a new job - "build an Ivy project" - 'ivysource',
a) add a build.xml etc,
b) add exact same trigger as 2.b above

5. (failure case)Now when you run he job 'ivysource' in the console of the 'target', all you see is:
+ echo

Finished: SUCCESS

i.e. no variables have been resolved.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
reeve lau commented on Bug JENKINS-15002

My setup:

Ivy Plugin : version 1.21
Jenkins Parameterized Trigger plugin : version 2.16
Jenkins : version 1.489

Ivy job triggers a parameterized free-style job => the free-style job get only default param values
Ivy job triggers a parameterized Ivy job => the Ivy job get only default param values

Free-style job triggers a parameterized free-style job => the downstream free-style job get all param values
Free-style job triggers a parameterized Ivy job => the downstream Ivy job get all param values

I hope this issue could be fixed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
cjo9900 commented on Bug JENKINS-15002

The problem looks to be that the ivy project implements its own triggering of downstream projects rather than letting the default trigger builder do this.
Which means that the parameterized trigger is not being called from the dependency graph so the parameters are not passed as expected from the ivy project.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
cjo9900 commented on Bug JENKINS-15002

Digging a bit deeper to the case that reeve lau mentioned.

Ivy job triggers a parameterized free-style job => the free-style job get only default param values
In this case the Ivy build calculates and triggers the downstream builds dependant on several conditions, these are:
do not trigger if downstream is already queued/building,

do not trigger if a upstream build of the downstream build is queued or already building.
e.g. at end of build A don't trigger Z if B is queued or building.
A-\
B->Z

do not trigger if a upstream build of the downstream build is also to be triggered from this build.
e.g. at end of build A don't trigger Z if as we will trigger C which will trigger Z
A->C-\
---->Z

do not trigger if any of the Ivy upstream projects (of the downstream project) have not completed successfully.
e.g. at end of build A don't trigger Z if B does not have a successful build.
A-\
B->Z

Once all of those conditions have been met then the downstream build is triggered directly, passing the ParameterizedUpstreamCause() and no other actions. and there is no calls to the dependencies to get their input to the new build.

Issue is in code at [1]

Ivy job triggers a parameterized Ivy job => the Ivy job get only default param values

You need to set the flag "Use parameters from upstream builds" under one of the advanced sections in the "Ivy Module Configuration" section of the ivy Job. The reason for this is that it passes the parameters via a build cause that by default ignores the parameters.

Free-style job triggers a parameterized free-style job => the downstream free-style job get all param values
Free-style job triggers a parameterized Ivy job => the downstream Ivy job get all param values

These work correctly as they are being triggered from the Dependency Graph which populates the parameters correctly from the dependencies, and are passed as straight Parameter Actions. to the downstream builds.

[1] https://github.com/jenkinsci/ivy-plugin/blob/master/src/main/java/hudson/ivy/AbstractIvyBuild.java#L71

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Prioject

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
reeve lau commented on Bug JENKINS-15002

Thanks cjo9900 for explaining the mechanism of how IVY triggering downstream build.

Regarding to
Ivy job triggers a parameterized Ivy job => the Ivy job get only default param values

Even if I set configure the downstream job to use the option of "Use parameters from upstream builds", it doesn't get the desired param values.

I guess IVY plugin has it own method to pass parameter to downstream job. That why all param values passed by upstream IVY job will be failed. I rather think that the issue is related to this line of code [1]. But I have no background to know how the IVY job get the param and pass them to the downstream....

[1] https://github.com/jenkinsci/ivy-plugin/blob/master/src/main/java/hudson/ivy/AbstractIvyBuild.java#L136

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15002) Parameterized trigger passes no parameters from Ivy Project

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Matt Benson (28/Nov/12 5:31 PM)
Summary: Parameterized trigger passes no parameters from Ivy  Prioject  Project
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Loading...