Skip to content
Permalink
Browse files

[fixed JENKINS-19740] Added postCheckout for SCMs

  • Loading branch information...
wolfgarnet committed Sep 25, 2013
1 parent de9816e commit e4ba0b365986b1da7c04c881b5edf33df3c4f826
Showing with 11 additions and 0 deletions.
  1. +4 −0 core/src/main/java/hudson/model/AbstractBuild.java
  2. +7 −0 core/src/main/java/hudson/scm/SCM.java
@@ -667,6 +667,10 @@ public void defaultCheckout() throws IOException, InterruptedException {
} catch (Exception e) {
throw new IOException2("Failed to parse changelog",e);
}

// Get a chance to do something after checkout and changelog is done
scm.postCheckout( build, launcher, build.getWorkspace(), listener );

return;
}
} catch (AbortException e) {
@@ -420,6 +420,13 @@ private boolean is1_346OrLater() {
*/
public abstract boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException;

/**
* Get a chance to do operations after the workspace i checked out and the changelog is written.
*/
public void postCheckout(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener) throws IOException, InterruptedException {
/* Default implementation is noop */
}

/**
* Adds environmental variables for the builds to the given map.
*

0 comments on commit e4ba0b3

Please sign in to comment.
You can’t perform that action at this time.