summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Urdin <tobias.urdin@binero.se>2019-01-16 12:29:36 +0100
committerTobias Urdin <tobias.urdin@binero.se>2019-01-17 10:16:22 +0100
commitfd8ffc6711d6481e2fcd40d158255f297156a1ff (patch)
tree2a625be29ea2417dfa13a302c5a3886015f7f180
parent20583c1e77e332ee912da0704baba214dd036c5f (diff)
Fix upload-puppetforge role
The role failed because the puppet-blacksmith gem required ruby-dev, gcc/g++ compiler and make to compile the gems that had native extensions. Fixes the Rakefile since the puppet-blacksmith module requires a "build" rake task, we can just empty that out since this role assumed the pkg/ folder in the module (zuul project dir) already contains the built module. Setups the GEM_HOME and GEM_BIN folders correctly so that we install gems in a predictable path which we can then pass as an environment to the rake command so that it knows where the actual commands are stored. Change-Id: I2b39dd69ab56d51e169b7ac6b77c675646006f10
Notes
Notes (review): Code-Review+2: Ian Wienand <iwienand@redhat.com> Code-Review+2: Andreas Jaeger <jaegerandi@gmail.com> Workflow+1: Andreas Jaeger <jaegerandi@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 18 Jan 2019 09:51:12 +0000 Reviewed-on: https://review.openstack.org/631194 Project: openstack-infra/zuul-jobs Branch: refs/heads/master
-rw-r--r--roles/upload-puppetforge/tasks/main.yaml30
1 files changed, 29 insertions, 1 deletions
diff --git a/roles/upload-puppetforge/tasks/main.yaml b/roles/upload-puppetforge/tasks/main.yaml
index 52fa288..d8e7fc7 100644
--- a/roles/upload-puppetforge/tasks/main.yaml
+++ b/roles/upload-puppetforge/tasks/main.yaml
@@ -1,14 +1,42 @@
1- name: Install ruby dependencies on RedHat/Suse based
2 package:
3 name:
4 - ruby-devel
5 - gcc-c++
6 - make
7 state: present
8 when: ansible_os_family == "RedHat" or ansible_os_family == "Suse"
9
10- name: Install ruby dependencies on Debian based
11 package:
12 name:
13 - ruby-dev
14 - g++
15 - make
16 state: present
17 when: ansible_os_family == "Debian"
18
1- name: Install required gems 19- name: Install required gems
2 gem: 20 gem:
3 name: "{{ item }}" 21 name: "{{ item }}"
22 user_install: no
4 with_items: 23 with_items:
5 - rake 24 - rake
6 - puppetlabs_spec_helper 25 - puppetlabs_spec_helper
7 - puppet-blacksmith 26 - puppet-blacksmith
8 27
28# NOTE(tobias.urdin): The build task is needed because puppet-blacksmith
29# doesn't provide a build task so it fails, we don't need one anyway since
30# we have already built the module before this role is called.
9- name: Install new Rakefile 31- name: Install new Rakefile
10 copy: 32 copy:
11 content: "require 'puppet_blacksmith/rake_tasks'" 33 content: |
34 namespace 'module' do
35 task 'build' do
36 end
37 end
38
39 require 'puppet_blacksmith/rake_tasks'
12 dest: "{{ puppet_module_dir }}/Rakefile" 40 dest: "{{ puppet_module_dir }}/Rakefile"
13 41
14- name: Publish puppet module 42- name: Publish puppet module