jenkins.model.Jenkins.copy()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中jenkins.model.Jenkins.copy()方法的一些代码示例,展示了Jenkins.copy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.copy()方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:copy

Jenkins.copy介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/jenkins

public <T extends AbstractProject<?,?>> T copy(T src, String name) throws IOException {
  return (T)copy((TopLevelItem)src,name);
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public <T extends AbstractProject<?,?>> T copy(T src, String name) throws IOException {
  return (T)copy((TopLevelItem)src,name);
}

代码示例来源:origin: jenkinsci/cloudbees-folder-plugin

/**
 * When copying a folder, its contents need to be recursively copied.
 */
@Test public void copy() throws Exception {
  Folder f = createFolder();
  FreeStyleProject c1 = f.createProject(FreeStyleProject.class, "child1");
  Folder c2 = f.createProject(Folder.class, "nested");
  FreeStyleProject c21 = c2.createProject(FreeStyleProject.class,"child2");
  Folder f2 = r.jenkins.copy(f, "fcopy");
  assertTrue(f2.getItem("child1") instanceof FreeStyleProject);
  Folder n = (Folder)f2.getItem("nested");
  assertTrue(n.getItem("child2") instanceof FreeStyleProject);
}

代码示例来源:origin: jenkinsci/gerrit-trigger-plugin

for (int i = 0; i < nrOfJobs; i++) {
  String name = String.format("project%d", i);
  FreeStyleProject copyProject = (FreeStyleProject)j.jenkins.copy((TopLevelItem)project, name);
  boolean mode = (i & 1) == 0; // true for even numbers
  copyProject.getTrigger(GerritTrigger.class).setSilentStartMode(mode);

相关文章

Jenkins类方法