本文整理了Java中hudson.model.Hudson.getGlobalNodeProperties()
方法的一些代码示例,展示了Hudson.getGlobalNodeProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getGlobalNodeProperties()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getGlobalNodeProperties
暂无
代码示例来源:origin: org.hudsonci.plugins/subversion
static String getUrlWithoutRevision(
String remoteUrlPossiblyWithRevision) {
String remoteUrlWithoutRevision = remoteUrlPossiblyWithRevision;
if (Hudson.getInstance() != null) {
for (NodeProperty n: Hudson.getInstance().getGlobalNodeProperties()) {
EnvironmentVariablesNodeProperty gnp = (EnvironmentVariablesNodeProperty)n;
for (Entry e : gnp.getEnvVars().entrySet()) {
if (remoteUrlWithoutRevision.contains("${" + e.getKey().toString() + "}")) {
remoteUrlWithoutRevision = remoteUrlWithoutRevision.replace("${" + e.getKey().toString() + "}", e.getValue().toString());
}
}
}
}
int idx = remoteUrlWithoutRevision.lastIndexOf('@');
if (idx > 0) {
String n = remoteUrlWithoutRevision.substring(idx + 1);
SVNRevision r = SVNRevision.parse(n);
if ((r != null) && (r.isValid())) {
return remoteUrlWithoutRevision.substring(0, idx);
}
}
return remoteUrlWithoutRevision;
}
代码示例来源:origin: org.jvnet.hudson.plugins/m2-extra-steps
public void buildEnvVars(AbstractBuild<?, ?> build, EnvVars env) {
for (NodeProperty nodeProperty: Hudson.getInstance().getGlobalNodeProperties()) {
if (nodeProperty instanceof EnvironmentVariablesNodeProperty) {
env.overrideAll(((EnvironmentVariablesNodeProperty)nodeProperty).getEnvVars());
}
}
for (NodeProperty nodeProperty: Computer.currentComputer().getNode().getNodeProperties()) {
if (nodeProperty instanceof EnvironmentVariablesNodeProperty) {
env.overrideAll(((EnvironmentVariablesNodeProperty)nodeProperty).getEnvVars());
}
}
}
}
代码示例来源:origin: org.jvnet.hudson.plugins/git
for (NodeProperty nodeProperty : Hudson.getInstance().getGlobalNodeProperties()) {
Environment environment = nodeProperty.setUp(b, launcher, (BuildListener) buildListener);
if (environment != null) {
代码示例来源:origin: org.hudsonci.plugins/git
for (NodeProperty nodeProperty : Hudson.getInstance().getGlobalNodeProperties()) {
Environment environment = nodeProperty.setUp(b, launcher, (BuildListener) buildListener);
if (environment != null) {
内容来源于网络,如有侵权,请联系作者删除!