Add support for dependent changes

Incorperate support for processing the ZUUL_CHANGES environment
variable in the OpenStack CI system such that dependent or triggered
changes for Ironic, Shade, or python-ironicclient are incorporated
for testing.
This commit is contained in:
Julia Kreger 2015-04-21 14:25:07 -04:00
parent 8cf06ee89f
commit e4bf5b1c7c
4 changed files with 17 additions and 35 deletions

View File

@ -1,22 +0,0 @@
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- 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/

View File

@ -15,15 +15,14 @@
--- ---
- name: "python-ironicclient - Retrieving library from git.openstack.org" - 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 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" - name: "python-ironicclient - Checking out master branch"
command: git checkout -f master chdir=/opt/stack/python-ironicclient command: git checkout -f master chdir=/opt/stack/python-ironicclient
when: ci_testing == false
- name: "python-ironicclient - Resetting local repository" - name: "python-ironicclient - Resetting local repository"
command: git reset --hard master chdir=/opt/stack/python-ironicclient command: git reset --hard master chdir=/opt/stack/python-ironicclient
when: ci_testing == false
- name: "python-ironicclient - Resyncing local repository" - name: "python-ironicclient - Resyncing local repository"
command: git pull --ff-only chdir=/opt/stack/python-ironicclient command: git pull --ff-only chdir=/opt/stack/python-ironicclient
when: ci_testing == false - name: "python-ironicclient - Apply CI changes if necessary"
script: parse_zuul_changes.py /opt/stack/python-ironicclient https://review.openstack.org openstack/python-ironicclient "{{ lookup('env', 'ZUUL_CHANGES') }}"
when: ci_testing == true
- name: "python-ironicclient - Installing patched python-ironicclient library." - name: "python-ironicclient - Installing patched python-ironicclient library."
command: pip install -I --force-reinstall /opt/stack/python-ironicclient command: pip install -I --force-reinstall /opt/stack/python-ironicclient

View File

@ -34,11 +34,17 @@
- sgabios - sgabios
- name: "Ensuring /opt/stack is present" - name: "Ensuring /opt/stack is present"
file: name=/opt/stack state=directory owner=root group=root file: name=/opt/stack state=directory owner=root group=root
- name: "Install Ironic" - name: "Downloading Ironic"
# NOTE(TheJulia): In the event of CI testing, we should expect the code to command: git clone https://git.openstack.org/openstack/ironic chdir=/opt/stack creates=/opt/stack/ironic
# already be in place. - name: "Ironic - checking out master branch"
include: ironic_source_download.yaml command: git checkout -f master chdir=/opt/stack/ironic
when: ci_testing == false - 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: "Ironic - Apply CI changes if necessary"
script: parse_zuul_changes.py /opt/stack/ironic https://review.openstack.org openstack/ironic "{{ lookup('env', 'ZUUL_CHANGES') }}"
when: ci_testing == true
- name: "Ironic Client - Install from source if configured to do so." - name: "Ironic Client - Install from source if configured to do so."
include: ironicclient_source_install.yml include: ironicclient_source_install.yml
when: skip_install is not defined and ((ironicclient_source_install is defined and ironicclient_source_install == true) or ci_testing == true) when: skip_install is not defined and ((ironicclient_source_install is defined and ironicclient_source_install == true) or ci_testing == true)

View File

@ -15,15 +15,14 @@
--- ---
- name: "Shade - Retrieving library from git.openstack.org" - 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 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" - name: "Shade - Checking out master branch"
command: git checkout -f master chdir=/opt/stack/shade command: git checkout -f master chdir=/opt/stack/shade
when: ci_testing == false
- name: "Shade - Resetting local repository" - name: "Shade - Resetting local repository"
command: git reset --hard master chdir=/opt/stack/shade command: git reset --hard master chdir=/opt/stack/shade
when: ci_testing == false
- name: "Shade - Resyncing local repository" - name: "Shade - Resyncing local repository"
command: git pull --ff-only chdir=/opt/stack/shade command: git pull --ff-only chdir=/opt/stack/shade
when: ci_testing == false - name: "Shade - Apply CI changes if necessary"
script: parse_zuul_changes.py /opt/stack/shade https://review.openstack.org openstack-infra/shade "{{ lookup('env', 'ZUUL_CHANGES') }}"
when: ci_testing == true
- name: "Shade - Installing patched shade library." - name: "Shade - Installing patched shade library."
command: pip install -I --force-reinstall /opt/stack/shade command: pip install -I --force-reinstall /opt/stack/shade