Status: Closed (View Workflow)
Hudson 1.359, Promoted Builds Plugin 1.7, Ubuntu 10.4, Firefox and Opera.
I am trying to fingerprint a file (date.txt) when a job gets promoted. I added a promotion action to do it and entered "date.txt" in the fingerprinting form that gets created into the promotion box.
This file is different from the file I fingerprint as a post-build task (revision.txt)
The problem is: only one setup of the fingerprinting form is saved when I submit my job configuration.
In other words: if I reload the configuration, the file date.txt appears both in the promotion action fingerprinting form (which is right) and in the post-build fingerprinting form (which is wrong: it should be revision.txt).
Here is my setup:
I have 4 jobs:
The first 3 jobs are fingerprinting a file with a revision number (revision.txt), and MainTask gets promoted if both SubTask1 and SubTask2 succeed (and if the fingerprint of their revisions matches).
If MainTask gets promoted, it should fingerprint a file containing the date (date.txt).
The last job runs once a day, and always fingerprints a file containing the date (date.txt). It gets promoted if MainTask is successful (and if the fingerprint of their dates matches).
The purpose of this setup is to have a hierarchical promotion process that returns only one promoted release per day. It was the first idea I came with when I thought about how to achieve such a promotion process.
I don't know if there are easier ways to do it, but I think the principle it good. It should work, but this bug is preventing it.
Code changed in hudson
User: : mindless
[FIXED JENKINS-6642] use JSON data instead of req.getParameter to avoid conflict when
fingerprinting is used more than once in form (like with promoted builds plugin).
fixed for 1.361. making this fix revealed another minor problem though.. the textbox and first checkbox will work properly now, but I discovered when looking at this that the other checkbox there ("keep build logs of dependencies") is actually a property of the Job, not the fingerprint settings.. so checking this checkbox in EITHER the promotion settings OR the main job setting will result in the checkbox being checking in both locations. suggestions on how to improve this are welcome
if I could detect when it's the main job instance vs some other instance (like for promotions) I could hide the 2nd checkbox.. not sure how to do that offhand though, so it may be easier to move that checkbox to the "advanced settings" section or something.
confirmed.. Fingerprinter does req.getParameter directly instead of using the JSON data which has the proper structured data when form elements are used more than once like this.. I'll change it.