是否有可能一个詹金斯自由风格的工作转换为多配置的工作吗?
我在詹金斯不少自由风格的工作,我想转换为多配置的工作,所以我可以在一个作业在多个平台上打造。这些工作指明了不少建造参数和我想不必通过创建新的多配置作业手动重新设置它们。每个作业当前限制了他们为构建我们已经建立的平台和唯一的选择我看到的是克隆现有作业更改限制到新的平台。这不是理想的,因为我需要保持2个任务,其中唯一的区别是目标平台。
I have quite a few free-style jobs in Jenkins that I would like to convert to multi-configuration jobs so I can build across multiple platforms under one job. These jobs specify quite a few build parameters and I would like to not have to set them up manually again by creating new multi-configuration jobs. Each job is currently limiting their builds to the platform we've been building on and the only other option I see is to clone the existing job and change the restriction to the new platform. This isn't ideal as I'll need to maintain 2 jobs where the only difference is the target platform.
我不明白的方式通过用户界面要做到这一点,但不知道是否有另一种方式。
I don't see a way to do this via the UI, but wondering if there is another way.
据我所知,有没有办法工作的类型转换的用户界面。你必须可以编辑作业的 config.xml中的,或复制和编辑配置文件,并创建一个基于编辑的配置新的工作。
As far as I know, there's no way to convert the type of job in the UI. You'll have to either edit the job's config.xml, or copy and edit the config file and create a new job based on the edited configuration.
您要查一个自由风格之间的差异
多配置工作与您所使用的各种设置。它可能是如
简单的从项目
中的 config.xml中的修改顶级元素为矩阵项目
。
You'll have to check the differences between a free-style and
multi-configuration job with the various settings that you use. It might be as
simple as changing the top-level element in config.xml from project
to matrix-project
.
如果您编辑现有的作业配置,你需要做的不是它,而
詹金斯离线,或者告诉詹金斯通过管理重新加载其配置
詹金斯 - > 刷新配置从磁盘。
If you edit the existing job configuration, you'll need to either do it while Jenkins is offline, or tell Jenkins to reload its configuration via Manage Jenkins -> Reload Configuration from Disk.
如果你决定创建新的就业机会,这previous问题一>可能会有所帮助,一旦
你找出编辑需要进行。具体来说这个答案介绍
上传一个配置文件来创建一个新的工作。
If you decide to create new jobs, this previous question might be helpful once you figure out what edits need to be made. Specifically this answer describes how to upload a config file to create a new job.