Updated from OpenStack Ansible Tests
Change-Id: I30ae09f1fe693934e5d713d4d37960a1b212483e
This commit is contained in:
parent
75262aeca9
commit
ae92d79dc0
|
@ -61,12 +61,11 @@ ChangeLog
|
||||||
releasenotes/build
|
releasenotes/build
|
||||||
|
|
||||||
# Test temp files
|
# Test temp files
|
||||||
tests/plugins
|
|
||||||
tests/common
|
tests/common
|
||||||
tests/test.retry
|
|
||||||
tests/*.retry
|
tests/*.retry
|
||||||
|
|
||||||
# Vagrant artifacts
|
# Vagrant artifacts
|
||||||
.vagrant
|
.vagrant
|
||||||
|
|
||||||
|
# Git clones
|
||||||
|
openstack-ansible-ops
|
||||||
|
|
|
@ -34,28 +34,39 @@ export TESTING_HOME=${TESTING_HOME:-$HOME}
|
||||||
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
|
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
|
||||||
export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no}
|
export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no}
|
||||||
|
|
||||||
## Main ----------------------------------------------------------------------
|
## Functions -----------------------------------------------------------------
|
||||||
|
|
||||||
|
function create_tests_clonemap {
|
||||||
|
|
||||||
# Prepare the clonemap for zuul-cloner to use
|
# Prepare the clonemap for zuul-cloner to use
|
||||||
# This is placed here instead of inside the conditional
|
|
||||||
# to prevent indentation problems.
|
|
||||||
cat > ${TESTING_HOME}/tests-clonemap.yaml << EOF
|
cat > ${TESTING_HOME}/tests-clonemap.yaml << EOF
|
||||||
clonemap:
|
clonemap:
|
||||||
- name: openstack/openstack-ansible-tests
|
- name: openstack/openstack-ansible-tests
|
||||||
dest: ${WORKING_DIR}/tests/common
|
dest: ${WORKING_DIR}/tests/common
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
## Main ----------------------------------------------------------------------
|
||||||
|
|
||||||
# If zuul-cloner is present, use it so that we
|
# If zuul-cloner is present, use it so that we
|
||||||
# also include any dependent patches from the
|
# also include any dependent patches from the
|
||||||
# tests repo noted in the commit message.
|
# tests repo noted in the commit message.
|
||||||
if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
|
if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
|
||||||
|
|
||||||
|
# Prepare the clonemap for zuul-cloner to use
|
||||||
|
create_tests_clonemap
|
||||||
|
|
||||||
|
# Execute the clone
|
||||||
/usr/zuul-env/bin/zuul-cloner \
|
/usr/zuul-env/bin/zuul-cloner \
|
||||||
--cache-dir /opt/git \
|
--cache-dir /opt/git \
|
||||||
--map ${TESTING_HOME}/tests-clonemap.yaml \
|
--map ${TESTING_HOME}/tests-clonemap.yaml \
|
||||||
git://git.openstack.org \
|
git://git.openstack.org \
|
||||||
openstack/openstack-ansible-tests
|
openstack/openstack-ansible-tests
|
||||||
|
|
||||||
|
# Clean up the clonemap.
|
||||||
|
rm -f ${TESTING_HOME}/tests-clonemap.yaml
|
||||||
|
|
||||||
# Alternatively, use a simple git-clone. We do
|
# Alternatively, use a simple git-clone. We do
|
||||||
# not re-clone if the directory exists already
|
# not re-clone if the directory exists already
|
||||||
# to prevent overwriting any local changes which
|
# to prevent overwriting any local changes which
|
||||||
|
@ -73,9 +84,6 @@ elif [[ ! -d tests/common ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up the clonemap.
|
|
||||||
rm -f ${TESTING_HOME}/tests-clonemap.yaml
|
|
||||||
|
|
||||||
# If this test set includes an upgrade test, the
|
# If this test set includes an upgrade test, the
|
||||||
# previous stable release tests repo must also be
|
# previous stable release tests repo must also be
|
||||||
# cloned.
|
# cloned.
|
||||||
|
|
Loading…
Reference in New Issue