How can I convert an existing Jenkins jobs to DSL Script?

Issue

  • We are in process of taking backup of all existing jobs and we want to convert all existing jenkins jobs to DSL Script to save them in SCM… 
  • Is there a way we can convert all existing jenkins jobs to DSL Script? 

Environment

  • CloudBees Jenkins Enterprise

Resolution

If you just want to backup the Jenkins Job configuration, you can use the SCM Sync configuration plugin (https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin). It automatically commits every job modification to a SCM.

For DSL scripting, there is either:

Unfortunately, none of theses plugins can automatically convert existing job configuration to a script. The YAML Project Plugin (https://wiki.jenkins-ci.org/display/JENKINS/YAML+Project+Plugin) can do that but the plugin is at its early stage.

Have more questions? Submit a request

0 Comments

Article is closed for comments.