本文整理了Java中hudson.model.Job.getCharacteristicEnvVars()
方法的一些代码示例,展示了Job.getCharacteristicEnvVars()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.getCharacteristicEnvVars()
方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:getCharacteristicEnvVars
[英]Builds up the environment variable map that's sufficient to identify a process as ours. This is used to kill run-away processes via ProcessTree#killAll(Map).
[中]建立环境变量映射,该映射足以将流程识别为我们的流程。这用于通过ProcessTree#killAll(Map)终止失控进程。
代码示例来源:origin: jenkinsci/jenkins
/**
* Builds up the environment variable map that's sufficient to identify a process
* as ours. This is used to kill run-away processes via {@link ProcessTree#killAll(Map)}.
*/
public @Nonnull final EnvVars getCharacteristicEnvVars() {
EnvVars env = getParent().getCharacteristicEnvVars();
env.put("BUILD_NUMBER",String.valueOf(number));
env.put("BUILD_ID",getId());
env.put("BUILD_TAG","jenkins-"+getParent().getFullName().replace('/', '-')+"-"+number);
return env;
}
代码示例来源:origin: jenkinsci/jenkins
env.putAll(getCharacteristicEnvVars());
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
public EnvVars superGetCharacteristicEnvVars() {
return super.getCharacteristicEnvVars();
}
代码示例来源:origin: jenkinsci/ghprb-plugin
public static String replaceMacros(Job<?, ?> project, String inputString) {
String returnString = inputString;
if (project != null && inputString != null) {
try {
Map<String, String> messageEnvVars = new HashMap<String, String>();
messageEnvVars.putAll(project.getCharacteristicEnvVars());
returnString = Util.replaceMacro(inputString, messageEnvVars);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Couldn't replace macros in message: ", e);
}
}
return returnString;
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
public EnvVars getCharacteristicEnvVars() {
initPython();
if (pexec.isImplemented(15)) {
return (EnvVars) pexec.execPython("get_characteristic_env_vars");
} else {
return super.getCharacteristicEnvVars();
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Builds up the environment variable map that's sufficient to identify a process
* as ours. This is used to kill run-away processes via {@link ProcessTree#killAll(Map)}.
*/
public @Nonnull final EnvVars getCharacteristicEnvVars() {
EnvVars env = getParent().getCharacteristicEnvVars();
env.put("BUILD_NUMBER",String.valueOf(number));
env.put("BUILD_ID",getId());
env.put("BUILD_TAG","jenkins-"+getParent().getFullName().replace('/', '-')+"-"+number);
return env;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
env.putAll(getCharacteristicEnvVars());
内容来源于网络,如有侵权,请联系作者删除!