Skip to main content
Warning This document has not been updated for a while now. It may be out of date.
Last updated: 5 Apr 2022

Rollback Puppet if Jenkins is broken

Sometimes, a Puppet release may break Jenkins and since Jenkins is used to release Puppet, there is no straight forward way to rollback Puppet.

This procedure will rollback Puppet to a previous release so that Jenkins is restored:

  1. log into the Puppet master machine:
  gds govuk connect ssh -e <govuk_environment> puppetmaster
  1. check the current active release by looking at the symbolic link of /usr/share/puppet/production/current:
  sudo su
  su deploy
  ls -lh /usr/share/puppet/production/
  1. get a list of Puppet available releases on the Puppet master, they are in the format year/month/day/time:
  ls /usr/share/puppet/production/releases
  1. link to another previous release using:
  ln -sfn /usr/share/puppet/production/releases/<previous_release_number> /usr/share/puppet/production/current
  1. restart Puppet service (as root or your admin user):
  service puppetserver restart
  1. log into the Jenkins server and re-run Puppet:
  gds govuk connect ssh -e integration jenkins
  govuk_puppet --test