Skip to content
Permalink
Browse files

Merge pull request #952 from wolfgarnet/master

[fixed JENKINS-19740] Added postCheckout for SCMs
  • Loading branch information...
vjuranek committed Sep 27, 2013
2 parents 69ba2b8 + e4ba0b3 commit 4d352aba6e6fd35e516428a2b9f3fe53dcfb3f6c
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 4d352ab

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