Skip to content

Commit

Permalink
[fixed JENKINS-16620] A better solution
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgarnet committed Feb 5, 2013
1 parent 8ade146 commit d0a6112
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/main/java/net/praqma/hudson/scm/CCUCMScm.java
Expand Up @@ -401,19 +401,12 @@ private void resolveBaseline( FilePath workspace, AbstractProject<?, ?> project,

List<Baseline> baselines = null;

CCUCMBuildAction lastAction = getLastAction( project );
/* We need to discriminate on promotion level, JENKINS-16620 */
Date date = null;
if( lastAction != null ) {
AbstractBuild lastBuild = lastAction.getBuild();
if( lastBuild.getResult().isBetterThan( Result.FAILURE ) ) {
if( plevel == null ) {
CCUCMBuildAction lastAction = getLastAction( project );
if( lastAction != null ) {
date = lastAction.getBaseline().getDate();
} else {
/* We need to include the last baseline as well, see JENKINS-16620 */
date = lastAction.getBaseline().getDate();
Calendar cal = Calendar.getInstance();
cal.setTime( date );
cal.add( Calendar.MINUTE, -1 );
date = cal.getTime();
}
}

Expand Down

0 comments on commit d0a6112

Please sign in to comment.