Build Promotions don't work with more than 1 downstream project

122 views
Skip to first unread message

Daniel Hinojosa

unread,
Apr 26, 2015, 2:27:31 AM4/26/15
to jenkins...@googlegroups.com
I saw another post with this issue, and it didn't see to go anywhere.

I have Job A, Job B, and Job C  where Job A triggers Job B on success and Job B triggers Job C on success.  All artifacts are copied and all are fingerprinted.

Job A has a promoted build that will trigger "When the following downstream projects build successfully" and that is the only criteria. The issue is that it only works where there is one job listed in the field and it is immediately downstream to Job A.  Any other circumstance and the build does not trigger.  Am I doing something wrong, like perhaps listing the project incorrectly, or is there an actual bug?

uvs...@gmail.com

unread,
Aug 19, 2015, 9:40:37 AM8/19/15
to Jenkins Users
Hi Daniel,

I'm dealing with the same issue and created this bug report in Jenkins Jira.

If we didn't do something wrong, it is supposed to be a common issue to many users.
I cannot find anything wrong in what I do.

Have you fixed this issues since then?

Jason Swager

unread,
Aug 19, 2015, 10:03:23 AM8/19/15
to Jenkins Users
Do you have a common file with the same fingerprint between jobs A, B, and C?  I have used this type of promotion before.

One thing you may want to check; do the fingerprints on job A show that the fingerprint originated in job A?  And are Job B and Job C listed with the same fingerprint?

uvs...@gmail.com

unread,
Aug 19, 2015, 10:25:56 AM8/19/15
to Jenkins Users
Hi Jason,

Although I'll try to play with it later, in my case in particular, I do NOT use fingerprints.
However, help message against "When the following downstream projects build successfully" field in promotion process configuration mentions NOTHING about fingerprints:

This option requires that a promoted build runs the designated downstream builds successfully. A typical use of this is to nominate downstream test jobs, so that you know a build has good test results before it gets promoted. Multiple jobs can be specified by separating their names by commas.
 
For example, consider a case where job xyz-test is set as the promotion criteria of job xyz. When xyz #100 is built, this will not be promoted right away as no xyz-test build has run yet. If you configured xyz-test as a downstream build of xyz, the successful completion of xyz #100 would trigger a xyz-test. When this completes successfully, xyz #100 will be promoted (even if other xyz builds happened since then.)

So, I assume it should work anyway (using only upstream-downstream relationships between A->B->C jobs in the chain).

BTW, this is similar thread based on description in the first posts (but there is no solution either): https://groups.google.com/forum/#!msg/jenkinsci-users/sYfljDWw87g/_useLnnAKY8J

Jason Swager

unread,
Aug 19, 2015, 10:34:29 AM8/19/15
to Jenkins Users
On Jenkins of the past, the concept of "downstream builds" was determined through the use of fingerprints.  I know that has been changing as new plugins have introduced new concepts of downstream builds.  The documentation may not refer to using fingerprints, but I found that using them made this feature work like you want it to.

uvs...@gmail.com

unread,
Aug 19, 2015, 11:39:28 AM8/19/15
to Jenkins Users
Jason, you are right about fingerprints.

The 3rd job (chain-job-c) complains in the console output:
WARNING: chain-job-a appears to use this job as a promotion criteria, but no fingerprint is recorded. Fingerprint needs to be enabled on both this job and chain-job-a. See http://hudson.gotdns.com/wiki/display/HUDSON/Fingerprint for more details

Only when the 3rd job start using artifact built by the 1st job (chain-job-c), the promotion worked.
In other words, if 100 jobs are used where successful build of the last job (N=100) has to promote build of the first job (N=1),
one has to mention the last job (N=100) in promotion configuration AND use fingerprinted artifact of the first job (N=1) in the last job (N=100).

I also had to archive artifact (simple text file) in the first job AND copy this artifact (Copy Artifact plugin) in the last job. Without archiving OR without copying, the chain does not work.

Apparently, without fingerprints only direct/next jobs are able to trigger promotion of their upstream job.
I consider this as a bug, but fingerprints provide required workaround.

Daniel Hinojosa

unread,
Aug 19, 2015, 11:55:41 AM8/19/15
to jenkins...@googlegroups.com

My artifacts were all fingerprinted. I thought it was always required. Still in a three tiered job A - B - C it didn't work. Its been a while since I tried it. I'll do so again.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/h0PIzYlxd2Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5b4b956d-54be-4bd1-83c3-561116fc9132%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages