From 8cec0d3f2682df17c56cf4eda0325771feebcef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Gagne=CC=81?= Date: Thu, 21 Aug 2014 10:30:09 -0400 Subject: [PATCH] Uninstall puppet before running puppet jobs Some versions of Puppet (2.7.x) do not like when an other version of Puppet (3.x) is installed at the same time, resulting in this kind of errors: cannot load such file -- windows/error Uninstalling and purging the system version of Puppet will prevent such conflicts from happening. Change-Id: I70aa291f0966fac4d7f32df4573eb164c1d5fccd --- .../files/jenkins_job_builder/config/macros.yaml | 5 +++++ .../files/jenkins_job_builder/config/puppet-module-jobs.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml index 7895b7fb34..0079786b75 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -80,6 +80,11 @@ - shell: "sudo apt-get install -y nodejs npm" - shell: "sudo ln /usr/bin/nodejs /usr/local/bin/node" +- builder: + name: uninstall-puppet + builders: + - shell: "sudo apt-get remove -y --purge puppet" + - builder: name: puppet-lint builders: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml index 632134f990..1505a80a11 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml @@ -3,6 +3,7 @@ node: '{node}' builders: + - uninstall-puppet - revoke-sudo - gerrit-git-prep - shell: |