本文整理了Java中hudson.model.AbstractProject.getWorkspace()
方法的一些代码示例,展示了AbstractProject.getWorkspace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractProject.getWorkspace()
方法的具体详情如下:
包路径:hudson.model.AbstractProject
类名称:AbstractProject
方法名:getWorkspace
[英]Gets the directory where the module is checked out.
[中]获取签出模块的目录。
代码示例来源:origin: jenkinsci/jenkins
@Override
protected void performDelete() throws IOException, InterruptedException {
// prevent a new build while a delete operation is in progress
makeDisabled(true);
FilePath ws = getWorkspace();
if(ws!=null) {
Node on = getLastBuiltOn();
getScm().processWorkspaceBeforeDeletion(this, ws, on);
if(on!=null)
on.getFileSystemProvisioner().discardWorkspace(this,ws);
}
super.performDelete();
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
protected void performDelete() throws IOException, InterruptedException {
// prevent a new build while a delete operation is in progress
makeDisabled(true);
FilePath ws = getWorkspace();
if(ws!=null) {
Node on = getLastBuiltOn();
getScm().processWorkspaceBeforeDeletion(this, ws, on);
if(on!=null)
on.getFileSystemProvisioner().discardWorkspace(this,ws);
}
super.performDelete();
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
protected void performDelete() throws IOException, InterruptedException {
// prevent a new build while a delete operation is in progress
makeDisabled(true);
FilePath ws = getWorkspace();
if(ws!=null) {
Node on = getLastBuiltOn();
getScm().processWorkspaceBeforeDeletion(this, ws, on);
if(on!=null)
on.getFileSystemProvisioner().discardWorkspace(this,ws);
}
super.performDelete();
}
代码示例来源:origin: org.jenkins-ci.plugins/collabnet
workspace = build.getProject().getRootProject().getWorkspace();
代码示例来源:origin: hudson/hudson-2.x
@Override
protected void performDelete() throws IOException, InterruptedException {
// prevent a new build while a delete operation is in progress
makeDisabled(true);
FilePath ws = getWorkspace();
if(ws!=null) {
Node on = getLastBuiltOn();
getScm().processWorkspaceBeforeDeletion(this, ws, on);
if(on!=null)
on.getFileSystemProvisioner().discardWorkspace(this,ws);
}
super.performDelete();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
protected void performDelete() throws IOException, InterruptedException {
// prevent a new build while a delete operation is in progress
makeDisabled(true);
FilePath ws = getWorkspace();
if (ws != null) {
Node on = getLastBuiltOn();
getScm().processWorkspaceBeforeDeletion(this, ws, on);
if (on != null) {
on.getFileSystemProvisioner().discardWorkspace(this, ws);
}
}
super.performDelete();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
protected void performDelete() throws IOException, InterruptedException {
// prevent a new build while a delete operation is in progress
makeDisabled(true);
FilePath ws = getWorkspace();
if (ws != null) {
Node on = getLastBuiltOn();
getScm().processWorkspaceBeforeDeletion(this, ws, on);
if (on != null) {
on.getFileSystemProvisioner().discardWorkspace(this, ws);
}
}
super.performDelete();
}
代码示例来源:origin: org.jvnet.hudson.plugins/jdepend
File jDependFile = null;
String sourcePath = ".";
FilePath sourceLocation = build.getProject().getWorkspace();
boolean copiedWorkspace = false;
JDependParser p = null;
代码示例来源:origin: org.jenkins-ci.plugins/copy-to-slave
@Override
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
EnvVars env = build.getEnvironment(listener);
env.overrideAll(build.getBuildVariables());
if(Computer.currentComputer() instanceof SlaveComputer) {
FilePath destinationFilePath;
if(isOverrideDestinationFolder() && StringUtils.isNotBlank(getDestinationFolder())) {
destinationFilePath = new FilePath(new File(env.expand(getDestinationFolder())));
}
else {
destinationFilePath = CopyToSlaveUtils.getProjectWorkspaceOnMaster(build, listener.getLogger());
}
FilePath projectWorkspaceOnSlave = build.getProject().getWorkspace();
String includes = env.expand(getIncludes());
String excludes = env.expand(getExcludes());
listener.getLogger().printf("[copy-to-slave] Copying '%s', excluding %s, from '%s' on '%s' to '%s' on the master.\n",
includes, StringUtils.isBlank(excludes) ? "nothing" : '\'' + excludes + '\'', projectWorkspaceOnSlave.toURI(),
Computer.currentComputer().getNode(), destinationFilePath.toURI());
projectWorkspaceOnSlave.copyRecursiveTo(includes, excludes, destinationFilePath);
}
else if(Computer.currentComputer() instanceof MasterComputer) {
listener.getLogger().println(
"[copy-to-slave] The build is taking place on the master node, no copy back to the master will take place.");
}
return true;
}
代码示例来源:origin: jenkinsci/sbt-plugin
FilePath sbtopts = build.getProject().getWorkspace().child(".sbtopts");
if (sbtopts.exists()) {
String argsToSplit = sbtopts.readToString();
内容来源于网络,如有侵权,请联系作者删除!