Search code examples
jenkinsjenkins-pluginsjenkins-pipelinejenkins-job-dsl

JobsDSL and Jenkins Versions


I am new to Jobs DSL and Jenkins. In our project we have lot of legacy Jenkins jobs DSL and we have a old jenkins probably 1.x. We are thinking to upgrade Jenkins to a new version of Jenkins. Have few question on the same.

  1. If we upgrade Jenkins 2.x version does the old JobDSL work with Jenkins 2.x ?
  2. We could upgrade our legacy JobsDSL to use latest JobsDSL so that it will work with 2.x Jenkins? How breaking the changes of JobsDSL version -1.32 to latest version?
  3. If we upgrade latest Jenkins and latest JobsDsl with that combo work ?

Thanks!


Solution

    1. It depends on how old your 1.x installation is. Updating from 1.651.3 to an early 2.x release should work.
    2. A lot has changed since version 1.32. See https://github.com/jenkinsci/job-dsl-plugin/wiki/Migration. Basic stuff has not changed. But if the scripts are complex and using certain plugins with a high rate of change, then scripts may break.
    3. Yes, but make sure to use an LTS verson of Jenkins. The latest LTS version is supported with the latest version of Job DSL.