Hi all!
I am currently working on detaching the required modules/extensions from the promoted-builds-plugin for a new plugin as proposed.
However, I have the following questions:
1) I assume that the entire promotion process starts from PromotionCondition abstract class and the flow goes like:
PromotionCondition -> PromotionProcess -> Actual Conditions(Manual,Self...) -> PromotionProcess.....
After listing all the conditions in the DescribableList how do we actually match the input parameter for promotion to the exact class(eg: if user wants manual promotion, how does the plugin send the build/other information to the exact class(self,manual.java.....) for further processing? )
I found the
getPromotionCondition method to be close. But this method is not called anywhere in the conditions.?
public PromotionCondition getPromotionCondition(String promotionClassName) {
for (PromotionCondition condition : conditions) {
if (condition.getClass().getName().equals(promotionClassName)) {
return condition;
}
}
return null;
}
2) Also if the flow is incorrect please help rectify it. And after the respective promotion modules are called is:
public Future<Promotion> considerPromotion2
used for the final promotion.
Thank You!!