How to use job import plugin in jenkins

元气小坏坏 提交于 2020-02-27 08:24:29

问题


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.


回答1:


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

Setting a Jenkins Server

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.

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.

Using the Jenkins Import plugin

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

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

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.

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

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.




回答2:


Follow below steps to import jobs using UI -

  1. You need to install job import plugin on the server where you need to import jobs to.

  2. Then go to the plugin displayed on left side of jenkins.

  3. Enter url and authentication and jobs will be listed of remote server.

  4. Select the jobs to be copied and done. Jenkins will copy the jobs to your server.

Refer link -

https://wiki.jenkins.io/display/JENKINS/Job+Import+Plugin


来源:https://stackoverflow.com/questions/51118228/how-to-use-job-import-plugin-in-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!