Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easy way to convert existing Jenkins freestyle job to New Jenkins 2.x pipeline view

I have tons of existing Freestyle Jenkins jobs in my old Jenkins Instance and now I would like to migrate them to New Jenkins 2.0 pipeline jobs using a Jenkins file.

I am following this page to create a Jenkins file: https://jenkins.io/doc/book/pipeline/jenkinsfile/

Can someone please suggest me if there is any easy way (or) plugin i can use to convert these existing job's to pipeline view.

like image 504
Harsha Avatar asked Jun 30 '17 14:06

Harsha


2 Answers

I haven't tried the plugin but while searching for same i came across this post: https://jenkins.io/blog/2017/12/15/auto-convert-freestyle-jenkins-jobs-to-coded-pipeline/

Maybe this can help. Will update more after actually giving it a ago. You can go through and try by yourself as well.

like image 67
Hanendra Avatar answered Sep 28 '22 01:09

Hanendra


don't think there is an automatic tool to convert jobs.

We created all new jobs with Jenkins DSL plugin

for the Jenkinsfile - we created some good examples of our basic flows and each team convert the relevant jobs.

like image 36
Mor Lajb Avatar answered Sep 27 '22 23:09

Mor Lajb