提交 8ff1dd63 编写于 作者: A Andrew Bayer

Add SCM.buildEnvVars(Run,Map<String,String>)

上级 285e83a9
...@@ -522,13 +522,22 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint { ...@@ -522,13 +522,22 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
* (for example, SVN revision number.) * (for example, SVN revision number.)
* *
* <p> * <p>
* This method is invoked whenever someone does {@link AbstractBuild#getEnvironment(TaskListener)}, which * This method is invoked whenever someone does {@link Run#getEnvironment(TaskListener)}, which
* can be before/after your checkout method is invoked. So if you are going to provide information about * can be before/after your checkout method is invoked. So if you are going to provide information about
* check out (like SVN revision number that was checked out), be prepared for the possibility that the * check out (like SVN revision number that was checked out), be prepared for the possibility that the
* check out hasn't happened yet. * check out hasn't happened yet.
*/ */
// TODO is an equivalent for Run needed? public void buildEnvVars(@Nonnull Run<?,?> build, @Nonnull Map<String,String> env) {
if (build instanceof AbstractBuild) {
buildEnvVars((AbstractBuild)build, env);
}
}
@Deprecated
public void buildEnvVars(AbstractBuild<?,?> build, Map<String, String> env) { public void buildEnvVars(AbstractBuild<?,?> build, Map<String, String> env) {
if (Util.isOverridden(SCM.class, getClass(), "buildEnvVars", Run.class, Map.class)) {
buildEnvVars((Run) build, env);
}
// default implementation is noop. // default implementation is noop.
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册