问题
I'm trying to set up Jenkins (v1.47) to build a project using the ClearCase UCM (v1.1.2) plugin.
With the following config (names changed to protect the innocent):
Stream: project_dev_build@\company_pvob<br/>
Component: project_tools@\company_pvob<br/>
Promotion level: INITIAL
I get the following output:
[CCUCM] * Stream: project_dev_build@\company_pvob
[CCUCM] * Component: project_tools@\company_pvob
[CCUCM] * Promotion level: INITIAL
[CCUCM] Removed 45 of 45 Baselines.
[CCUCM] No valid baselines found
I can see in my ClearCase client that there are exactly 45 baselines, all in the INITIAL
promotion level, for that stream and component.
So the plugin obviously finds and then discards them.
But why?
I expected the latest one to be picked up, why are they all rejected?
I should note that if I change the config from "INITIAL
" to "ALL
" it makes no difference, the same thing happens.
回答1:
That message is produced by the net.praqma.hudson.scm.CCUCMScm#pollStream() method
It calls filterBaselines() which removed all "deliver.xxx
" baselines or unlabelled baselines.
private int filterBaselines( List<Baseline> baselines ) {
int pruned = 0;
/* Remove deliver baselines */
Iterator<Baseline> it = baselines.iterator();
while( it.hasNext() ) {
Baseline baseline = it.next();
if( baseline.getShortname().startsWith( "deliverbl." ) || baseline.getLabelStatus().equals( LabelStatus.UNLABLED ) ) {
it.remove();
pruned++;
}
}
return pruned;
}
If all your baselines have been produced by deliver operations, that would explain why the plugin removes them from the possible baselines to select for a build.
来源:https://stackoverflow.com/questions/11192289/why-the-clearcase-ucm-plugin-in-jenkins-is-unable-to-find-any-baseline