Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-14702] Getting project
  • Loading branch information
wolfgarnet committed Aug 7, 2012
1 parent 58b22cb commit ccb9d11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/main/java/net/praqma/hudson/Config.java
Expand Up @@ -4,6 +4,7 @@

import net.praqma.clearcase.exceptions.ClearCaseException;
import net.praqma.clearcase.exceptions.CleartoolException;
import net.praqma.clearcase.exceptions.UCMEntityNotFoundException;
import net.praqma.clearcase.exceptions.UnableToInitializeEntityException;
import net.praqma.clearcase.exceptions.UnableToLoadEntityException;
import net.praqma.clearcase.ucm.entities.Baseline;
Expand Down Expand Up @@ -68,8 +69,12 @@ public static Stream getIntegrationStream( Baseline bl, String buildProject ) th
try {
project = Project.get( "Jenkins", bl.getPVob() ).load();
} catch( Exception eJ ) {
logger.warning( "The build Project was not found." );
project = bl.getStream().getProject();
logger.debug( "Using current project as build project" );
try {
project = bl.getStream().load().getProject();
} catch( Exception e ) {
throw new ScmException( "Could not get a build Project", null );
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/net/praqma/hudson/test/CCUCMRule.java
Expand Up @@ -75,7 +75,7 @@ public FreeStyleProject setupProject( String projectName, String type, String co

// boolean createBaseline, String nameTemplate, boolean forceDeliver, boolean recommend, boolean makeTag, boolean setDescription
//CCUCMScm scm = new CCUCMScm( component, "INITIAL", "ALL", false, type, stream, "successful", createBaseline, "[project]_build_[number]", forceDeliver, recommend, tag, description, "jenkins" );
CCUCMScm scm = new CCUCMScm( component, "INITIAL", "ALL", false, type, stream, "successful", createBaseline, template, forceDeliver, recommend, tag, description, "jenkins" );
CCUCMScm scm = new CCUCMScm( component, "INITIAL", "ALL", false, type, stream, "successful", createBaseline, template, forceDeliver, recommend, tag, description, "" );
this.scm = scm;
project.setScm( scm );

Expand Down

0 comments on commit ccb9d11

Please sign in to comment.