如何在 jenkins 中使用作业导入插件 [英] How to use job import plugin in jenkins

查看:45
本文介绍了如何在 jenkins 中使用作业导入插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法访问两台服务器,因此 cli 不是一个选项,只有 jenkins ui 可用.我需要使用作业导入插件导入作业,但我不知道如何配置插件以导入作业.谁能帮我解决这个问题.

I don't have access to both servers so cli is not an option only jenkins ui is available. I need to import jobs using job import plugin but i am unable to figure how to configure the plugin so as to import jobs. Could anyone please help me with this.

推荐答案

要配置 Jenkins Remote Plugin,您需要添加一个 Jenkins Server 来导入您的作业.

To configure the Jenkins Remote Plugin, you need to add a Jenkins Server to import your jobs.

要添加 Jenkins 服务器,您需要继续进行 Jenkins 配置:Manage Jenkins >配置系统 >Job Import Pluginhttp://jenkins-host:port/configure 并将 Url 和凭据添加到将从中导入作业的主机.

To add a Jenkins Server, you need to go on your Jenkins configuration: Manage Jenkins > Configure System > Job Import Plugin or http://jenkins-host:port/configure and add the Url and credentials to the host from where will import the jobs.

如果您没有,则需要将凭据添加到此服务器,为此请单击 URL 设置下方的选项添加.

If you don't have, will need to add the credentials to this server, to do this click on the option Add bellow the Url settings.

设置 Jenkins 服务器后,您将能够通过转到 Jenkins 主页中的选项 Job Import Plugin 或转到 URL:http://来使用 Jenkins Import 插件jenkins-host:port/Job-import/http://jenkins-host:port/job-import/ 在新版本中.

After setting a Jenkins server, you will be able to use the Jenkins Import plugin by going to option Job Import Plugin in the Jenkins home or going to the URL: http://jenkins-host:port/Job-import/ or http://jenkins-host:port/job-import/ in the new versions.

如果你只添加了一个 Jenkins 服务器,它将被默认选择,否则,需要选择正确的 Jenkins 服务器:

If you added only a Jenkins Server it will be selected as default, otherwise, the correct Jenkins server will need to be selected:

通常您不需要设置远程文件夹搜索文件夹选项,因此如果您使用默认的 Jenkins 设置,请将这些字段留空.

Normally you don't need to set the Remote folder or Search into folders options, so if you use the default Jenkins settings, leave these fields blank.

然后,您将单击 Query! 按钮开始导入.将显示一个包含所有可导入作业的页面.

Then, you will click on the Query! button, to start your import. A page with all jobs available to be imported will be showed.

您需要逐一选择要导入的所有工作,如果您有很多工作(例如我的情况),这可能有点无聊.一个好主意是也选择 Install required plugins 选项.

You will need to select all the jobs you want to import one by one, if you have many jobs (like in my case) this can be a little boring. A good idea is to select the Install required plugins option too.

选择所有内容后,您可以点击导入!按钮最终开始导入.

After select everything, you can click on the Import! button to finally starts your import.

这篇关于如何在 jenkins 中使用作业导入插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆