Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-16636] If there are no valid baselines, throw
  • Loading branch information
wolfgarnet committed Feb 5, 2013
1 parent e1555bf commit 5772cb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/praqma/hudson/notifier/CCUCMNotifier.java
Expand Up @@ -112,18 +112,18 @@ public boolean perform( AbstractBuild<?, ?> build, Launcher launcher, BuildListe
processBuild( build, launcher, listener, action );
if( action.doSetDescription() ) {
String d = build.getDescription();
logger.fine( String.format( "build.getDesciption() is: %s",d ) );
logger.fine( String.format( "build.getDesciption() is: %s", d ) );
if( d != null ) {
build.setDescription( ( d.length() > 0 ? d + "<br/>" : "" ) + status.getBuildDescr() );
} else {
logger.fine( String.format( "Setting build description to: %s",status.getBuildDescr() ) );
logger.fine( String.format( "Setting build description to: %s", status.getBuildDescr() ) );
build.setDescription( status.getBuildDescr() );
}

}

} catch( NotifierException ne ) {
out.println("NotifierException: "+ ne.getMessage() );
out.println( "NotifierException: " + ne.getMessage() );
} catch( IOException e ) {
out.println( String.format( "%s Couldn't set build description", logShortPrefix ) );
//out.println( "[" + Config.nameShort + "] Couldn't set build description." );
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/praqma/hudson/scm/CCUCMScm.java
Expand Up @@ -197,10 +197,10 @@ public boolean checkout( AbstractBuild<?, ?> build, Launcher launcher, FilePath
if( action != null ) {
action.setBaseline( last.getBaseline() );
} else {
Util.println( out, "No Baselines found" );
throw new AbortException( "No valid baselines found" );
}
} else {
Util.println( out, "No new Baseline found" );
throw new AbortException( "No valid baselines found" );
}
}
}
Expand Down Expand Up @@ -247,7 +247,7 @@ public boolean checkout( AbstractBuild<?, ?> build, Launcher launcher, FilePath

/* If there's a result let's find out whether a baseline is found or not */
if( action.getBaseline() == null ) {
out.println( "[" + Config.nameShort + "] Finished processing; the baseline is null, this could pose as a problem!" );
out.println( "[" + Config.nameShort + "] Finished processing, no baseline found" );
} else {
out.println( "[" + Config.nameShort + "] Finished processing " + action.getBaseline() );
}
Expand Down

0 comments on commit 5772cb3

Please sign in to comment.