Use a custom git checkout in developer mode
This patch allows a developer to customise the code for keystone, then test the changes when executing any of the tox tests we implement. The workflow means that by default the git_repo will be cloned from upstream (this ensures gating continues to work). If the developer specifies a "keystone_dev_local_directory" then the repo will not be cloned, and it assumes the developer has already cloned and edited that repo. A clone can be forced using "keystone_dev_force_clone" to "True". Change-Id: Ibb666a803e73b50e3ee1918e633a9bbb84b084da
This commit is contained in:
parent
cee7a02143
commit
c8631347e7
18
tests/group_vars/keystone_all.yml
Normal file
18
tests/group_vars/keystone_all.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2016, Rackspace US, Inc.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
lxc_container_bind_mounts:
|
||||||
|
- host_directory: "{{ keystone_dev_local_directory | default('/opt/keystone') }}"
|
||||||
|
container_directory: "/opt/keystone"
|
@ -16,6 +16,10 @@
|
|||||||
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
|
||||||
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
|
||||||
|
|
||||||
|
keystone_git_repo: "file:///opt/keystone"
|
||||||
|
keystone_dev_clone_repo: "https://git.openstack.org/openstack/keystone"
|
||||||
|
keystone_dev_force_clone: False
|
||||||
|
|
||||||
tempest_run: yes
|
tempest_run: yes
|
||||||
|
|
||||||
tempest_plugins:
|
tempest_plugins:
|
||||||
|
26
tests/test-clone-repo.yml
Normal file
26
tests/test-clone-repo.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2017, Rackspace US, Inc.
|
||||||
|
#
|
||||||
|
# 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: Clone keystone repository if it doesn't exist
|
||||||
|
hosts: localhost
|
||||||
|
user: root
|
||||||
|
pre_tasks:
|
||||||
|
- name: Clone the repo
|
||||||
|
git:
|
||||||
|
repo: "{{ keystone_dev_clone_repo }}"
|
||||||
|
dest: "{{ keystone_dev_local_directory | default('/opt/keystone') }}"
|
||||||
|
version: "{{ keystone_dev_git_branch | default('master') }}"
|
||||||
|
register: git_clone
|
||||||
|
until: git_clone|success
|
@ -19,6 +19,9 @@
|
|||||||
# Install upgrade benchmarking
|
# Install upgrade benchmarking
|
||||||
- include: test-benchmark-keystone-upgrade.yml
|
- include: test-benchmark-keystone-upgrade.yml
|
||||||
|
|
||||||
|
# Update repo
|
||||||
|
- include: test-clone-repo.yml
|
||||||
|
|
||||||
# Install Keystone
|
# Install Keystone
|
||||||
- include: common/test-install-keystone.yml
|
- include: common/test-install-keystone.yml
|
||||||
|
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
# Prepare the host
|
# Prepare the host
|
||||||
- include: common/test-prepare-host.yml
|
- include: common/test-prepare-host.yml
|
||||||
|
|
||||||
|
# Clone the repo
|
||||||
|
- include: test-clone-repo.yml
|
||||||
|
vars:
|
||||||
|
keystone_dev_git_branch: "stable/ocata"
|
||||||
|
|
||||||
# Prepare the containers
|
# Prepare the containers
|
||||||
- include: common/test-prepare-containers.yml
|
- include: common/test-prepare-containers.yml
|
||||||
|
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
# Prepare the host
|
# Prepare the host
|
||||||
- include: common/test-prepare-host.yml
|
- include: common/test-prepare-host.yml
|
||||||
|
|
||||||
|
# Clone repository
|
||||||
|
- include: test-clone-repo.yml
|
||||||
|
when: >
|
||||||
|
keystone_dev_local_directory is not defined or
|
||||||
|
keystone_dev_force_clone
|
||||||
|
|
||||||
# Prepare the containers
|
# Prepare the containers
|
||||||
- include: common/test-prepare-containers.yml
|
- include: common/test-prepare-containers.yml
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user