From 691ddeb614bdc85ed4f3594744c7bc7a732832f4 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 21 Jun 2019 11:37:45 +0100 Subject: [PATCH] Execute kayobe in verbose mode in CI Also refactors the CI job playbooks to create the previous git repo clones for upgrade jobs in the kayobe-base job. Change-Id: I10c2b872887a47fab1a373fc0525dcd6fc78f7e2 --- playbooks/kayobe-base/pre.yml | 32 +++++++++++++++++++ .../kayobe-overcloud-upgrade-base/pre.yml | 18 ----------- playbooks/kayobe-seed-upgrade-base/pre.yml | 18 ----------- zuul.d/jobs.yaml | 1 + 4 files changed, 33 insertions(+), 36 deletions(-) diff --git a/playbooks/kayobe-base/pre.yml b/playbooks/kayobe-base/pre.yml index f90db4a1c..df5db3b6b 100644 --- a/playbooks/kayobe-base/pre.yml +++ b/playbooks/kayobe-base/pre.yml @@ -15,3 +15,35 @@ dest: "/tmp" mode: 0644 remote_src: true + + - name: Ensure kayobe is executed in verbose mode + lineinfile: + path: "{{ kayobe_src_dir }}/dev/config.sh" + line: "export KAYOBE_EXTRA_ARGS=-vvv" + regexp: "^#export KAYOBE_EXTRA_ARGS=$" + + - block: + - name: Ensure previous kayobe directory exists + file: + path: "{{ previous_kayobe_src_dir }}" + state: directory + + - name: Ensure previous kayobe repository is cloned + command: >- + git clone {{ kayobe_src_dir }} {{ previous_kayobe_src_dir }} -b stable/{{ previous_release | lower }} + + - name: Ensure previous kayobe-config directory exists + file: + path: "{{ previous_kayobe_config_src_dir }}" + state: directory + + - name: Ensure kayobe-config repository is cloned + command: >- + git clone {{ kayobe_config_src_dir }} {{ previous_kayobe_config_src_dir }} -b stable/{{ previous_release | lower }} + + - name: Ensure previous kayobe is executed in verbose mode + lineinfile: + path: "{{ previous_kayobe_src_dir }}/dev/config.sh" + line: "export KAYOBE_EXTRA_ARGS=-vvv" + regexp: "^#export KAYOBE_EXTRA_ARGS=$" + when: is_upgrade diff --git a/playbooks/kayobe-overcloud-upgrade-base/pre.yml b/playbooks/kayobe-overcloud-upgrade-base/pre.yml index 8370ae461..7809b50bc 100644 --- a/playbooks/kayobe-overcloud-upgrade-base/pre.yml +++ b/playbooks/kayobe-overcloud-upgrade-base/pre.yml @@ -1,24 +1,6 @@ --- - hosts: primary tasks: - - name: Ensure previous kayobe directory exists - file: - path: "{{ previous_kayobe_src_dir }}" - state: directory - - - name: Ensure previous kayobe repository is cloned - command: >- - git clone {{ kayobe_src_dir }} {{ previous_kayobe_src_dir }} -b stable/{{ previous_release | lower }} - - - name: Ensure previous kayobe-config directory exists - file: - path: "{{ previous_kayobe_config_src_dir }}" - state: directory - - - name: Ensure kayobe-config repository is cloned - command: >- - git clone {{ kayobe_config_src_dir }} {{ previous_kayobe_config_src_dir }} -b stable/{{ previous_release | lower }} - # NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes # precedence over the standard config files. - name: Ensure kayobe-config override config file exists diff --git a/playbooks/kayobe-seed-upgrade-base/pre.yml b/playbooks/kayobe-seed-upgrade-base/pre.yml index c21aac0cd..c38f7beb3 100644 --- a/playbooks/kayobe-seed-upgrade-base/pre.yml +++ b/playbooks/kayobe-seed-upgrade-base/pre.yml @@ -1,24 +1,6 @@ --- - hosts: primary tasks: - - name: Ensure previous kayobe directory exists - file: - path: "{{ previous_kayobe_src_dir }}" - state: directory - - - name: Ensure previous kayobe repository is cloned - command: >- - git clone {{ kayobe_src_dir }} {{ previous_kayobe_src_dir }} -b stable/{{ previous_release | lower }} - - - name: Ensure previous kayobe-config directory exists - file: - path: "{{ previous_kayobe_config_src_dir }}" - state: directory - - - name: Ensure kayobe-config repository is cloned - command: >- - git clone {{ kayobe_config_src_dir }} {{ previous_kayobe_config_src_dir }} -b stable/{{ previous_release | lower }} - # NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes # precedence over the standard config files. - name: Ensure kayobe-config override config file exists diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 2c3141a63..ebdc8bc85 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -84,6 +84,7 @@ previous_kayobe_config_src_dir: "{{ ansible_env.PWD ~ '/previous/kayobe-config' }}" requirements_src_dir: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/requirements'].src_dir }}" tenks_src_dir: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/tenks'].src_dir }}" + is_upgrade: "{{ 'upgrade' in zuul.job }}" - job: name: kayobe-overcloud-base