Removed integrated ZUUL reference patcher
Bifrost intiially had support for parsing ZUUL_CHANGES, however due to changes in it's gate CI jobs, these steps are no longer necessary. As a result of this change, we also need to support copying files directly and not forcibly resetting the git status since the repositories are provided to us in the way they are needed without additional work. As a result, added logic to the preparation and git download role to support local file copies instead of git downloads. Also changed default source location for CI testing repos to leverage the WORKSPACE environment variable. Change-Id: I23e902c8637e142fba23d71467225d48ee265253 Depends-On: I01c16990dc66988fab29c41ec4b4e6094213b2ca
This commit is contained in:
parent
e51de22084
commit
9909e00ede
@ -14,6 +14,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# Note(TheJulia): This script is no longer required by bifrost, however
|
||||||
|
# it may prove useful to those performing complex feature development
|
||||||
|
# within bifrost where they do not want to wait to rely upon CI jobs.
|
||||||
|
# DEPRICATED: Remove after Mitaka cycle
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -13,19 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
---
|
---
|
||||||
# TODO(TheJulia) Remove this once 199580 has landed
|
|
||||||
- name: "Shade - Apply CI changes if necessary"
|
|
||||||
script: parse_zuul_changes.py {{ shade_git_folder }} https://review.openstack.org openstack-infra/shade "{{ lookup('env', 'ZUUL_CHANGES') }}"
|
|
||||||
when: ci_testing_zuul_changes is defined and skip_install | bool != true
|
|
||||||
- name: "python-ironicclient - Apply CI changes if necessary"
|
|
||||||
script: parse_zuul_changes.py {{ ironicclient_git_folder }} https://review.openstack.org openstack/python-ironicclient "{{ lookup('env', 'ZUUL_CHANGES') }}"
|
|
||||||
when: ci_testing_zuul_changes is defined and skip_install | bool != true
|
|
||||||
- name: "ironic - Apply CI changes if necessary"
|
|
||||||
script: parse_zuul_changes.py {{ ironic_git_folder }} https://review.openstack.org openstack/ironic "{{ lookup('env', 'ZUUL_CHANGES') }}"
|
|
||||||
when: ci_testing_zuul_changes is defined and skip_install | bool != true
|
|
||||||
- name: "diskimage-builder - Apply CI changes if necessary"
|
|
||||||
script: parse_zuul_changes.py {{ dib_git_folder }} https://review.openstack.org openstack/diskimage-builder "{{ lookup('env', 'ZUUL_CHANGES') }}"
|
|
||||||
when: ci_testing_zuul_changes is defined and skip_install | bool != true
|
|
||||||
# NOTE(TheJulia): Override the stored fact values for username/password when operating
|
# NOTE(TheJulia): Override the stored fact values for username/password when operating
|
||||||
# in OpenStack CI.
|
# in OpenStack CI.
|
||||||
- name: "Set facts for OpenStack CI"
|
- name: "Set facts for OpenStack CI"
|
||||||
|
@ -46,6 +46,14 @@ ironic_git_branch: Branch to install, defaults to "master".
|
|||||||
|
|
||||||
shade_git_branch: Branch to install, defaults to "master".
|
shade_git_branch: Branch to install, defaults to "master".
|
||||||
|
|
||||||
|
copy_from_local_path: Boolean value, defaulting to false that allows
|
||||||
|
a user to define the role to copy the files instead
|
||||||
|
of cloning fresh copies from Git.
|
||||||
|
|
||||||
|
ci_testing_zuul: Boolean value, default false. This value is utilized
|
||||||
|
to tell the prepatory playbook when the prep role
|
||||||
|
is running in a CI system with Zuul, which in such
|
||||||
|
cases the repositories must be copied, not overwritten.
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -16,3 +16,7 @@ ironicclient_git_branch: master
|
|||||||
ironic_git_branch: master
|
ironic_git_branch: master
|
||||||
shade_git_branch: master
|
shade_git_branch: master
|
||||||
dib_git_branch: master
|
dib_git_branch: master
|
||||||
|
|
||||||
|
# Conditional variables utilized based on CI or manual testing options.
|
||||||
|
copy_from_local_path: false
|
||||||
|
ci_testing_zuul: false
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
# 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: "Download ironic"
|
||||||
|
command: git clone {{ ironic_git_url }} {{ ironic_git_folder }} chdir={{ git_root }} creates={{ ironic_git_folder }}
|
||||||
|
- name: "Ironic - check out branch"
|
||||||
|
command: git checkout -f {{ ironic_git_branch }} chdir={{ ironic_git_folder }}
|
||||||
|
- name: "Ironic - reset branch"
|
||||||
|
command: git reset --hard {{ ironic_git_branch }} chdir={{ ironic_git_folder }}
|
||||||
|
- name: "Ironic - resync to current branch"
|
||||||
|
command: git pull --ff-only chdir={{ ironic_git_folder }}
|
||||||
|
- name: "python-ironicclient - Retrieve library from git.openstack.org"
|
||||||
|
command: git clone {{ ironicclient_git_url }} {{ ironicclient_git_folder }} chdir={{ git_root }} creates={{ ironicclient_git_folder }}
|
||||||
|
- name: "python-ironicclient - Check out branch"
|
||||||
|
command: git checkout -f {{ ironicclient_git_branch}} chdir={{ironicclient_git_folder}}
|
||||||
|
- name: "python-ironicclient - Reset local repository"
|
||||||
|
command: git reset --hard {{ ironicclient_git_branch }} chdir={{ ironicclient_git_folder }}
|
||||||
|
- name: "python-ironicclient - Resync local repository"
|
||||||
|
command: git pull --ff-only chdir={{ ironicclient_git_folder }}
|
||||||
|
- name: "Shade - Retrieve library from git.openstack.org"
|
||||||
|
command: git clone {{ shade_git_url }} {{ shade_git_folder }} chdir={{ git_root }} creates={{ shade_git_folder }}
|
||||||
|
- name: "Shade - Check out branch"
|
||||||
|
command: git checkout -f {{ shade_git_branch }} chdir={{ shade_git_folder }}
|
||||||
|
- name: "Shade - Reset local repository"
|
||||||
|
command: git reset --hard {{ shade_git_branch }} chdir={{ shade_git_folder }}
|
||||||
|
- name: "Shade - Resync local repository"
|
||||||
|
command: git pull --ff-only chdir={{ shade_git_folder }}
|
||||||
|
- name: "Disk Image Builder - Retrieve from git.openstack.org"
|
||||||
|
command: git clone {{ dib_git_url }} {{ dib_git_folder }} chdir={{ git_root }} creates={{ dib_git_folder }}
|
||||||
|
- name: "Disk Image Builder - Check out branch"
|
||||||
|
command: git checkout -f {{ dib_git_branch }} chdir={{ dib_git_folder }}
|
||||||
|
- name: "Disk Image Builder - Reset local repository"
|
||||||
|
command: git reset --hard {{ dib_git_branch }} chdir={{ dib_git_folder }}
|
||||||
|
- name: "Disk Image Builder - Resync local repository"
|
||||||
|
command: git pull --ff-only chdir={{ dib_git_folder }}
|
@ -0,0 +1,23 @@
|
|||||||
|
# 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: "ironic - Copy into place"
|
||||||
|
command: cp -a {{ ironic_git_url }} {{ ironic_git_folder }} chdir={{ git_root }} creates={{ ironic_git_folder }}
|
||||||
|
- name: "python-ironicclient - Copy into place"
|
||||||
|
command: cp -a {{ ironicclient_git_url }} {{ ironicclient_git_folder }} chdir={{ git_root }} creates={{ ironicclient_git_folder }}
|
||||||
|
- name: "Shade - Copy into place"
|
||||||
|
command: cp -a {{ shade_git_url }} {{ shade_git_folder }} chdir={{ git_root }} creates={{ shade_git_folder }}
|
||||||
|
- name: "Disk Image Builder - Copy into place"
|
||||||
|
command: cp -a {{ dib_git_url }} {{ dib_git_folder }} chdir={{ git_root }} creates={{ dib_git_folder }}
|
@ -13,35 +13,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
---
|
---
|
||||||
- name: "Download ironic"
|
- name: "Download via GIT"
|
||||||
command: git clone {{ ironic_git_url }} {{ ironic_git_folder }} chdir={{ git_root }} creates={{ ironic_git_folder }}
|
include: git_download.yaml
|
||||||
- name: "Ironic - check out branch"
|
when: ci_testing_zuul | bool == false and copy_from_local_path | bool == false
|
||||||
command: git checkout -f {{ ironic_git_branch }} chdir={{ ironic_git_folder }}
|
- name: "Copy from local path"
|
||||||
- name: "Ironic - reset branch"
|
include: local_path.yaml
|
||||||
command: git reset --hard {{ ironic_git_branch }} chdir={{ ironic_git_folder }}
|
when: ci_testing_zuul | bool or copy_from_local_path | bool
|
||||||
- name: "Ironic - resync to current branch"
|
|
||||||
command: git pull --ff-only chdir={{ ironic_git_folder }}
|
|
||||||
- name: "python-ironicclient - Retrieve library from git.openstack.org"
|
|
||||||
command: git clone {{ ironicclient_git_url }} {{ ironicclient_git_folder }} chdir={{ git_root }} creates={{ ironicclient_git_folder }}
|
|
||||||
- name: "python-ironicclient - Check out branch"
|
|
||||||
command: git checkout -f {{ ironicclient_git_branch}} chdir={{ironicclient_git_folder}}
|
|
||||||
- name: "python-ironicclient - Reset local repository"
|
|
||||||
command: git reset --hard {{ ironicclient_git_branch }} chdir={{ ironicclient_git_folder }}
|
|
||||||
- name: "python-ironicclient - Resync local repository"
|
|
||||||
command: git pull --ff-only chdir={{ ironicclient_git_folder }}
|
|
||||||
- name: "Shade - Retrieve library from git.openstack.org"
|
|
||||||
command: git clone {{ shade_git_url }} {{ shade_git_folder }} chdir={{ git_root }} creates={{ shade_git_folder }}
|
|
||||||
- name: "Shade - Check out branch"
|
|
||||||
command: git checkout -f {{ shade_git_branch }} chdir={{ shade_git_folder }}
|
|
||||||
- name: "Shade - Reset local repository"
|
|
||||||
command: git reset --hard {{ shade_git_branch }} chdir={{ shade_git_folder }}
|
|
||||||
- name: "Shade - Resync local repository"
|
|
||||||
command: git pull --ff-only chdir={{ shade_git_folder }}
|
|
||||||
- name: "Disk Image Builder - Retrieve from git.openstack.org"
|
|
||||||
command: git clone {{ dib_git_url }} {{ dib_git_folder }} chdir={{ git_root }} creates={{ dib_git_folder }}
|
|
||||||
- name: "Disk Image Builder - Check out branch"
|
|
||||||
command: git checkout -f {{ dib_git_branch }} chdir={{ dib_git_folder }}
|
|
||||||
- name: "Disk Image Builder - Reset local repository"
|
|
||||||
command: git reset --hard {{ dib_git_branch }} chdir={{ dib_git_folder }}
|
|
||||||
- name: "Disk Image Builder - Resync local repository"
|
|
||||||
command: git pull --ff-only chdir={{ dib_git_folder }}
|
|
||||||
|
@ -16,10 +16,13 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
ci_testing: true
|
ci_testing: true
|
||||||
ci_testing_zuul: true
|
ci_testing_zuul: true
|
||||||
ironic_git_url: /opt/git/openstack/ironic
|
ironic_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/ironic"
|
||||||
ironicclient_git_url: /opt/git/openstack/python-ironicclient
|
ironicclient_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/python-ironicclient"
|
||||||
shade_git_url: /opt/git/openstack-infra/shade
|
shade_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack-infra/shade"
|
||||||
dib_git_url: /opt/git/openstack/diskimage-builder
|
dib_git_url: "/opt/git/openstack/diskimage-builder"
|
||||||
|
# TODO(TheJulia) Fix the above paths to be consistent, because the NV job gets the dib
|
||||||
|
# folder cloned, while the gate job does not. Likely need to work out a semi-hybrid
|
||||||
|
# solution.
|
||||||
when: lookup('env', 'ZUUL_BRANCH') != ""
|
when: lookup('env', 'ZUUL_BRANCH') != ""
|
||||||
- name: "Set ci_testing_zuul_changes if ZUUL_CHANGES is set"
|
- name: "Set ci_testing_zuul_changes if ZUUL_CHANGES is set"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
Loading…
Reference in New Issue
Block a user