Skip to content

Commit

Permalink
[JENKINS-17230] Using new prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgarnet committed Apr 11, 2013
1 parent 031efa1 commit 0040fd9
Showing 1 changed file with 9 additions and 3 deletions.
Expand Up @@ -15,9 +15,11 @@
import net.praqma.clearcase.ucm.entities.Baseline;
import net.praqma.clearcase.ucm.entities.Project;
import net.praqma.clearcase.ucm.entities.Stream;
import net.praqma.clearcase.ucm.view.GetView;
import net.praqma.clearcase.ucm.view.SnapshotView;
import net.praqma.clearcase.ucm.view.UpdateView;
import net.praqma.clearcase.util.ViewUtils;
import net.praqma.jenkins.configrotator.ConfigurationRotator;
import net.praqma.jenkins.utils.ViewUtils;

public class PrepareWorkspace implements FileCallable<SnapshotView> {

Expand Down Expand Up @@ -68,7 +70,9 @@ public SnapshotView invoke( File workspace, VirtualChannel channel ) throws IOEx
try {
out.println( ConfigurationRotator.LOGGERNAME + "View root: " + new File( workspace, "view" ) );
out.println( ConfigurationRotator.LOGGERNAME + "View tag : " + viewtag );
view = ViewUtils.createView( out, devStream, "ALL", new File( workspace, "view" ), viewtag, true );
//view = ViewUtils.createView( devStream, "ALL", new File( workspace, "view" ), viewtag, true );
view = new GetView( new File( workspace, "view" ), viewtag ).validateView().get();
new UpdateView( view ).setLoadRules( new SnapshotView.LoadRules( view, SnapshotView.Components.ALL ) ).swipe().generate().overwrite().update();
} catch( ClearCaseException e ) {
throw new IOException( "Unable to create view", e );
}
Expand All @@ -86,7 +90,9 @@ public SnapshotView invoke( File workspace, VirtualChannel channel ) throws IOEx
}

try {
view = ViewUtils.createView( out, devStream, "ALL", new File( workspace, "view" ), viewtag, true );
//view = ViewUtils.createView( devStream, "ALL", new File( workspace, "view" ), viewtag, true );
view = new GetView( new File( workspace, "view" ), viewtag ).setStream( devStream ).createIfAbsent().get();
new UpdateView( view ).setLoadRules( new SnapshotView.LoadRules( view, SnapshotView.Components.ALL ) ).generate().update();
} catch( ClearCaseException e ) {
throw new IOException( "Unable to create view", e );
}
Expand Down

0 comments on commit 0040fd9

Please sign in to comment.