Changes to support CI testing
When we begin using CI testing, we will want to support installation of specific revisions which ultimately means Bifrost's installation process needs to support a slightly different path. Adds a setting, ci_testing, which is normally set to false. This setting skips retreval of the files for Ironic, ironicclient, and shade so any CI prepatory can just leave the appropriate files in /opt/stack/.
This commit is contained in:
parent
20358c43e2
commit
f5bf4730e4
@ -44,6 +44,7 @@ transform_boot_image: false
|
||||
# If testing is true, then the environment is setup for using libvirt
|
||||
# virtual machines for the hardware instead of real hardware.
|
||||
testing: false
|
||||
ci_testing: false
|
||||
latest_os_ironic_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic.py
|
||||
latest_os_ironic_node_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic_node.py
|
||||
deploy_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz"
|
||||
|
@ -15,11 +15,15 @@
|
||||
---
|
||||
- name: "python-ironicclient - Retrieving library from git.openstack.org"
|
||||
command: git clone https://review.openstack.org/openstack/python-ironicclient chdir=/opt/stack creates=/opt/stack/python-ironicclient
|
||||
when: ci_testing == false
|
||||
- name: "python-ironicclient - Checking out master branch"
|
||||
command: git checkout -f master chdir=/opt/stack/python-ironicclient
|
||||
when: ci_testing == false
|
||||
- name: "python-ironicclient - Resetting local repository"
|
||||
command: git reset --hard master chdir=/opt/stack/python-ironicclient
|
||||
when: ci_testing == false
|
||||
- name: "python-ironicclient - Resyncing local repository"
|
||||
command: git pull --ff-only chdir=/opt/stack/python-ironicclient
|
||||
when: ci_testing == false
|
||||
- name: "python-ironicclient - Installing patched python-ironicclient library."
|
||||
command: pip install -I --force-reinstall /opt/stack/python-ironicclient
|
||||
|
@ -34,35 +34,26 @@
|
||||
- sgabios
|
||||
- name: "Ensuring /opt/stack is present"
|
||||
file: name=/opt/stack state=directory owner=root group=root
|
||||
- name: "Downloading Ironic"
|
||||
command: git clone https://git.openstack.org/openstack/ironic chdir=/opt/stack creates=/opt/stack/ironic
|
||||
- name: "Ironic - checking out master branch"
|
||||
command: git checkout -f master chdir=/opt/stack/ironic
|
||||
- name: "Ironic - resetting master branch"
|
||||
command: git reset --hard master chdir=/opt/stack/ironic
|
||||
- name: "Ironic - resyncing to current master branch"
|
||||
command: git pull --ff-only chdir=/opt/stack/ironic/
|
||||
- name: "Install Ironic"
|
||||
# NOTE(TheJulia): In the event of CI testing, we should expect the code to
|
||||
# already be in place.
|
||||
include: ironic_source_download.yaml
|
||||
when: ci_testing == false
|
||||
- name: "Ironic Client - Install from source if configured to do so."
|
||||
include: ironicclient_source_install.yml
|
||||
when: skip_install is not defined and ironicclient_source_install is defined and ironicclient_source_install == true
|
||||
when: skip_install is not defined and ((ironicclient_source_install is defined and ironicclient_source_install == true) or ci_testing == true)
|
||||
- name: "Ironic Client - Install from pip"
|
||||
pip: name=python-ironicclient state=present
|
||||
when: skip_install is not defined and (ironicclient_source_install is not defined or ironicclient_source_install == false)
|
||||
when: skip_install is not defined and (ironicclient_source_install is not defined or ironicclient_source_install == false) and (ci_testing == false)
|
||||
- name: "proliantutils - Install from pip"
|
||||
pip: name=proliantutils state=present
|
||||
when: skip_install is not defined
|
||||
# TODO: The next package is installed via git and then manyally installed
|
||||
# as the os_ironic and os_ironic_node are under active development and
|
||||
# may require features that have not yet been released in shade.
|
||||
# TODO: If the portion below remains for any period of time, it should
|
||||
# be converted to an include... or consider converting to the integrated
|
||||
# git module.
|
||||
- name: "Shade - Install from source if configured to do so"
|
||||
include: shade_source_install.yml
|
||||
when: skip_install is not defined and shade_source_install is defined and shade_source_install == true
|
||||
when: skip_install is not defined and ((shade_source_install is defined and shade_source_install == true) or ci_testing == true)
|
||||
- name: "Shade - Installing patched shade library."
|
||||
pip: name=shade state=latest
|
||||
when: skip_install is not defined and (shade_source_install is not defined or shade_source_install == false)
|
||||
when: skip_install is not defined and (shade_source_install is not defined or shade_source_install == false) and (ci_testing == false)
|
||||
- name: "Include diskimage-builder installation"
|
||||
include: dib_install.yml
|
||||
when: create_image_via_dib == true
|
||||
|
@ -15,11 +15,15 @@
|
||||
---
|
||||
- name: "Shade - Retrieving library from git.openstack.org"
|
||||
command: git clone https://review.openstack.org/openstack-infra/shade chdir=/opt/stack creates=/opt/stack/shade
|
||||
when: ci_testing == false
|
||||
- name: "Shade - Checking out master branch"
|
||||
command: git checkout -f master chdir=/opt/stack/shade
|
||||
when: ci_testing == false
|
||||
- name: "Shade - Resetting local repository"
|
||||
command: git reset --hard master chdir=/opt/stack/shade
|
||||
when: ci_testing == false
|
||||
- name: "Shade - Resyncing local repository"
|
||||
command: git pull --ff-only chdir=/opt/stack/shade
|
||||
when: ci_testing == false
|
||||
- name: "Shade - Installing patched shade library."
|
||||
command: pip install -I --force-reinstall /opt/stack/shade
|
||||
|
Loading…
Reference in New Issue
Block a user