Can you please help me out how to upgrade an existing application which is jenkins using chef. I am trying to upgrade Jenkins from 1.x to 2.x and I have a cookbook for 1.x. what steps do I need to take to upgrade 1.x version to 2.x along with plugins. Environment: Rhel and using rpm package to install jenkins

  • Do you mean your current jenkins application is using chef and you'd like to upgrade it? Or you mean using chef as a means to perform the jenkins upgrade? Apr 7, 2017 at 20:03
  • @DanCornilescu using chef as a means to perform the jenkins upgrade
    – pandey
    Apr 7, 2017 at 20:53
  • 1
    Chef is just manner. here, jenkins1 to jenkins2, I would not recommend upgrading in place, a major version change mean breaking changes. I may extend this comment in an answer after the week end.
    – Tensibai
    Apr 7, 2017 at 21:08

1 Answer 1


So first of all, Chef is just a manner of upgrading/configuring, it will help you keep a reproducible state and keeping configuration in line but it won't do black magic and translate your jobs for you.

Now for Jenkins 1 to Jenkins 2, Jenkins-ci site says Jenkins 2 is Backward Compatible.
While this is true, when you update the pipeline plugin, not all plugins are compatible yet. There's a compatibility list on the pipeline plugin github page.

I would recommend installing a fresh Jenkins 2 and porting your jobs from Jenkins 1 to Jenkins 2. This will spot breaking plugins in Jenkins 2, allow you to strip up not needed anymore plugins and refactor your jobs.
This way you can also take advantage of defining the pipelines with a Jenkinsfile along with the code of your application.

  • Assuming there are more than a handful of jobs to port, your approach can't be done without either having two instances of Jenkins running parallel or some considerable amount of downtime. Neither of which is feasible IMHO. Do you have any thoughts/experience regarding this?
    – peetasan
    Oct 25, 2017 at 12:59
  • 1
    My answer is exactly that, have 2 jenkins instance running in parallel, I worded it as it's exactly what we're doing at my company actually for roughly 230 jobs. Write the jenkinsfile for jenkins2 (and take advantage of it for pipelines), stop building on jenkins 1, build on Jenkins 2 to validate, if fail re-enable on jenkins 1 and restart at 1, if ok you're done for this one, start the next. that's not an easy task obviously.
    – Tensibai
    Oct 25, 2017 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.