somexp12
somexp12

Reputation: 547

Any documentation for the Jenkins Job Import plugin?

I am researching ways to migrate jobs from one Jenkins instance to another. Unfortunately, no solution has worked from start to finish.

One solution has involved the use of the Jenkins Job Import Plugin. The trouble with this is that I can find zero documentation on it. At the plugin site, there is only a change log.

Does anyone have any information on how to use this plugin?

It has only two fields, Jenkins Server and Remote Folder. One thing I have tried is to set up the Jenkins Server and then include the job name in the latter field. The result of this is . . . no result. The browser just does its loading thing for awhile before returning to the same page. Ditto if I include the path to the job on the server (/var/lib/Jenkins/jobs . . .) in the latter field. I can put gibberish in the second field and get the same result, without any feedback whatsoever.

Looking in the developer tools of my browser, I see a POST request to [JenkinsEndpoint]:8080/JobImport/query, with no parameters that returns 200 no matter what. (Return result is the html of the same page I was just on.)

Upvotes: 3

Views: 2998

Answers (3)

Ian W
Ian W

Reputation: 4767

This is an old question, but later S/O answers provide guidance how to use the Job Import plugin and to address specific later release (LTS 2.289.3 / job-import-3.4) issues with jobs in folders.

Sharing for those finding this is in their search.

Maybe one day the answers will be migrated to the plugin documentation .. ?

Upvotes: 0

theetails
theetails

Reputation: 1

Check your logs in /var/log/jenkins/jenkins.log

You might find that the connection is refused because of certificate issues.

Installing the certificate in the java cert store should fix it (if that's your issue).

I know you have this solved, but just going forward you should check your logs. Job import plugin is in the wrong because it doesn't give feedback, but logs can help you figure out most problems.

Upvotes: 0

Ashokekumar S
Ashokekumar S

Reputation: 361

I too had a similar requirement, and usually we will just copy the job config as stated here - https://wiki.jenkins.io/display/JENKINS/Administering+Jenkins

Upvotes: 1

Related Questions