本文整理了Java中jenkins.model.Jenkins.getRootPath()
方法的一些代码示例,展示了Jenkins.getRootPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.getRootPath()
方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:getRootPath
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the file used to store the initial admin password
*/
public FilePath getInitialAdminPasswordFile() {
return Jenkins.get().getRootPath().child("secrets/initialAdminPassword");
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Binds /userContent/... to $JENKINS_HOME/userContent.
*/
public DirectoryBrowserSupport doUserContent() {
return new DirectoryBrowserSupport(this,getRootPath().child("userContent"),"User content","folder.png",true);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the file used to store the initial admin password
*/
public FilePath getInitialAdminPasswordFile() {
return Jenkins.getInstance().getRootPath().child("secrets/initialAdminPassword");
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Binds /userContent/... to $JENKINS_HOME/userContent.
*/
public DirectoryBrowserSupport doUserContent() {
return new DirectoryBrowserSupport(this,getRootPath().child("userContent"),"User content","folder.png",true);
}
代码示例来源:origin: jenkinsci/shiningpanda-plugin
/**
* Get the folder on master where user can put some packages to avoid
* downloads when creating a VIRTUALENV.
*
* @return The packages folder
* @throws IOException
* @throws InterruptedException
*/
public FilePath getMasterPackagesDir() throws IOException, InterruptedException {
return FilePathUtil.isDirectoryOrNull(Jenkins.getInstance().getRootPath().child(BASENAME).child(PACKAGES));
}
代码示例来源:origin: jenkinsci/envinject-plugin
public Map<String, String> getEnvVarsPropertiesJobProperty(@Nonnull FilePath rootPath,
@Nonnull EnvInjectLogger logger,
boolean loadFilesFromMaster,
@CheckForNull String propertiesFilePath,
@CheckForNull Map<String, String> propertiesContent,
@Nonnull Map<String, String> infraEnvVarsMaster,
@Nonnull Map<String, String> infraEnvVarsNode) throws EnvInjectException {
final Map<String, String> resultMap = new LinkedHashMap<String, String>();
try {
if (loadFilesFromMaster) {
// Even if the propertiesFilePath is null, we do not want to allow loading
// from the master, because it may expose sensitive Environment Variables
if (!EnvInjectPluginConfiguration.getOrFail().isEnableLoadingFromMaster()) {
throw EnvInjectExceptionFormatter.forProhibitedLoadFromMaster(propertiesFilePath);
}
resultMap.putAll(Jenkins.getActiveInstance().getRootPath().act(
new PropertiesVariablesRetriever(
propertiesFilePath, propertiesContent, infraEnvVarsMaster, logger)));
} else {
resultMap.putAll(rootPath.act(
new PropertiesVariablesRetriever(
propertiesFilePath, propertiesContent, infraEnvVarsNode, logger)));
}
} catch (IOException e) {
throw new EnvInjectException(e);
} catch (InterruptedException e) {
throw new EnvInjectException(e);
}
return resultMap;
}
代码示例来源:origin: org.jenkins-ci.plugins/scripttrigger
log.info("System script.");
rootPath = Jenkins.getInstance().getRootPath();
} else {
log.info("Script executed on node.");
代码示例来源:origin: jenkinsci/junit-plugin
@LocalData
@Test
public void testSlave() throws Exception {
DumbSlave s = rule.createOnlineSlave();
project.setAssignedLabel(s.getSelfLabel());
FilePath src = new FilePath(rule.jenkins.getRootPath(), "jobs/" + BASIC_TEST_PROJECT + "/workspace/");
assertNotNull(src);
FilePath dest = s.getWorkspaceFor(project);
assertNotNull(dest);
src.copyRecursiveTo("*.xml", dest);
testBasic();
}
代码示例来源:origin: jenkinsci/junit-plugin
@RandomlyFails("TimeoutException from basic")
@LocalData("All")
@Test public void slave() throws Exception {
DumbSlave s = j.createOnlineSlave();
project.setAssignedLabel(s.getSelfLabel());
FilePath src = new FilePath(j.jenkins.getRootPath(), "jobs/junit/workspace/");
assertNotNull(src);
FilePath dest = s.getWorkspaceFor(project);
assertNotNull(dest);
src.copyRecursiveTo("*.xml", dest);
basic();
}
内容来源于网络,如有侵权,请联系作者删除!