Skip to content

Commit

Permalink
Merge pull request #26 from vivek/JENKINS-41010
Browse files Browse the repository at this point in the history
[JENKINS-41010] Expose StepContext from PlaceholderTask
  • Loading branch information
jglick committed Jan 13, 2017
2 parents 31a6371 + 4100749 commit a123390
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import static java.util.logging.Level.*;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import jenkins.model.Jenkins;
import jenkins.model.Jenkins.MasterComputer;
Expand Down Expand Up @@ -247,6 +248,15 @@ private Object readResolve() {
return this;
}

/**
* Gives {@link FlowNode}, waiting to be executed in build {@link Queue}.
*
* @return FlowNode instance, could be null.
*/
public @CheckForNull FlowNode getNode() throws IOException, InterruptedException {
return context.get(FlowNode.class);
}

@Override public Queue.Executable createExecutable() throws IOException {
return new PlaceholderExecutable();
}
Expand Down

0 comments on commit a123390

Please sign in to comment.