Jenkins has the Gerrit Plugin in place so that when we do check-ins to Gerrit, Jenkins performs a build and if it succeeds, then the modification in Gerrit is verified. If the build fails then it is not. My understanding is that this is accomplished through jobs set up in Jenkins. We have now created a new branch (git) and I guess I need to clone the existing jobs pointing to the other branch so that this same workflow occurs and builds are performed on every commit. Can somebody explain how I would clone these jobs? I don't seem to see a way to do it through the UI nor can I even see a way to list the jobs out through the UI.
当前回答
詹金斯2.9
Jenkins >新项目 输入项目名称-例如。“MY_CLONE” 指定源(Copy from)作业> OK 当您开始键入名称时,将会找到现有的值。注意,这是区分大小写的。 如果希望保留默认值,则单击Save。 现在这两个工作都在同一个地方:
其他回答
我无法从子文件夹复制詹金斯作业。从选项复制没有显示我正在寻找的建议。不使用建议,复制作业名是行不通的。
因此,如果您想从外部文件夹创建一个作业,您需要首先在子文件夹中创建作业,然后将其移动到需要放置它的不同文件夹中。
新建项目>项目名称= abc >选择“从已有作业的作业名称复制”,而不是“Freestyle作业”
如果你在你想要复制的文件夹中,那么使用../。
你可以使用Jobcopy Builder插件
在我的例子中,我必须将一个作业从一个jenkins实例复制到另一个实例。
因此,首先我查看了旧Jenkins的目录结构(作业/目录名;还注意到config.xml),然后在新jenkins的目录结构下,在那里我创建了一个同名/job的目录,并复制了这个新创建的目录下的config.xml。
然后在“管理Jenkins”下,我点击“从磁盘重新加载配置”。这是它。
要复制现有作业,请访问http://your-jenkins/newJob并使用“复制现有作业”选项。输入现有作业的名称——Jenkins将验证它是否存在。
Jenkins首页上的默认选项卡应该列出所有现有的工作,但可能是您的前任删除了该选项卡。您可以创建一个新选项卡,列出http://your-jenkins/newView中的所有作业。
推荐文章
- 为什么我需要显式地推一个新分支?
- 如何撤消最后的git添加?
- Rubymine:如何让Git忽略Rubymine创建的.idea文件
- Gitignore二进制文件,没有扩展名
- Git隐藏错误:Git隐藏弹出并最终与合并冲突
- 了解Git和GitHub的基础知识
- 没有。Git目录的Git克隆
- Git与Mercurial仓库的互操作性
- 忽略git中修改(但未提交)的文件?
- “git restore”命令是什么?“git restore”和“git reset”之间有什么区别?
- Git合并与强制覆盖
- Git拉另一个分支
- 在Bash命令提示符上添加git分支
- 如何更改Git日志日期格式
- 如何使用GitHub Org Plugin从jenkins管道(jenkinsfile)触发另一个作业?