summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Pretorius <jesse.pretorius@rackspace.co.uk>2017-10-17 18:12:44 +0100
committerJesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk>2017-10-18 17:32:42 +0000
commit176837ee2c0d7c98c2d7df9c3197e393f153f198 (patch)
treebd9448cf8fb881a1f8e537856dc8c278a7079dfd
parent55723c9c9490a93626afdcf621464b94a32fb861 (diff)
Initial OSA zuul v3 role jobs17.0.0.0b1
This patch implements an initial set of jobs intended to match the current job execution method. It does not intend to improve how the jobs are executed - only to replicate what is currently in openstack-infra/openstack-zuul-jobs and provide the platform to iterate on. Depends-On: I0391ec310c4eede436011a48490e3c524c8ddf4d Change-Id: If1f638bf5e3bd1baefdce57a8a1ed44daf6b5c61
Notes
Notes (review): Code-Review+2: Kevin Carter (cloudnull) <kevin@cloudnull.com> Code-Review+2: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk> Workflow+1: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 19 Oct 2017 10:30:28 +0000 Reviewed-on: https://review.openstack.org/512746 Project: openstack/openstack-ansible-os_tacker Branch: refs/heads/master
-rw-r--r--doc/source/conf.py4
-rw-r--r--releasenotes/source/conf.py4
-rwxr-xr-xrun_tests.sh20
-rwxr-xr-xtests/tests-repo-clone.sh24
-rw-r--r--zuul.d/project.yaml26
5 files changed, 57 insertions, 21 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index eec498e..ecee8f8 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -69,7 +69,9 @@ target_name = 'openstack-ansible-' + role_name
69title = 'OpenStack-Ansible Documentation: ' + role_name + 'role' 69title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
70 70
71# The link to the browsable source code (for the left hand menu) 71# The link to the browsable source code (for the left hand menu)
72oslosphinx_cgit_link = 'https://git.openstack.org/cgit/openstack/' + target_name 72oslosphinx_cgit_link = (
73 "https://git.openstack.org/cgit/openstack/{}".format(target_name)
74)
73 75
74# The version info for the project you're documenting, acts as replacement for 76# The version info for the project you're documenting, acts as replacement for
75# |version| and |release|, also used in various other places throughout the 77# |version| and |release|, also used in various other places throughout the
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 41f4f66..c1cff26 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -65,7 +65,9 @@ target_name = 'openstack-ansible-' + role_name
65title = 'OpenStack-Ansible Release Notes: ' + role_name + 'role' 65title = 'OpenStack-Ansible Release Notes: ' + role_name + 'role'
66 66
67# The link to the browsable source code (for the left hand menu) 67# The link to the browsable source code (for the left hand menu)
68oslosphinx_cgit_link = 'https://git.openstack.org/cgit/openstack/' + target_name 68oslosphinx_cgit_link = (
69 "https://git.openstack.org/cgit/openstack/{}".format(target_name)
70)
69 71
70# The version info for the project you're documenting, acts as replacement for 72# The version info for the project you're documenting, acts as replacement for
71# |version| and |release|, also used in various other places throughout the 73# |version| and |release|, also used in various other places throughout the
diff --git a/run_tests.sh b/run_tests.sh
index e8f6f3a..d9dacfb 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -49,24 +49,12 @@ install_pkg_deps() {
49 eval sudo $pkg_mgr_cmd $pkg_deps 49 eval sudo $pkg_mgr_cmd $pkg_deps
50} 50}
51 51
52git_clone_repo() { 52# Install the host distro package dependencies
53 if [[ ! -d tests/common ]]; then
54 # The tests repo doesn't need a clone, we can just
55 # symlink it.
56 if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
57 ln -s ${WORKING_DIR} ${WORKING_DIR}/tests/common
58 else
59 git clone \
60 https://git.openstack.org/openstack/openstack-ansible-tests \
61 tests/common
62 fi
63 fi
64}
65
66install_pkg_deps 53install_pkg_deps
67 54
68git_clone_repo 55# Clone the tests repo for access to the common test script
56source tests/tests-repo-clone.sh
69 57
70# start executing the main test script 58# Execute the common test script
71source tests/common/run_tests_common.sh 59source tests/common/run_tests_common.sh
72 60
diff --git a/tests/tests-repo-clone.sh b/tests/tests-repo-clone.sh
index 39efbb1..3e4ffd6 100755
--- a/tests/tests-repo-clone.sh
+++ b/tests/tests-repo-clone.sh
@@ -33,6 +33,7 @@ set -e
33export TESTING_HOME=${TESTING_HOME:-$HOME} 33export TESTING_HOME=${TESTING_HOME:-$HOME}
34export WORKING_DIR=${WORKING_DIR:-$(pwd)} 34export WORKING_DIR=${WORKING_DIR:-$(pwd)}
35export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no} 35export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no}
36export ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/git.openstack.org/openstack/openstack-ansible-tests"
36 37
37## Functions ----------------------------------------------------------------- 38## Functions -----------------------------------------------------------------
38 39
@@ -52,7 +53,11 @@ EOF
52# If zuul-cloner is present, use it so that we 53# If zuul-cloner is present, use it so that we
53# also include any dependent patches from the 54# also include any dependent patches from the
54# tests repo noted in the commit message. 55# tests repo noted in the commit message.
55if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then 56# We only want to use zuul-cloner if we detect
57# zuul v2 running, so we check for the presence
58# of the ZUUL_REF environment variable.
59# ref: http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/ansible/filter/zuul_filters.py?h=feature/zuulv3#n17
60if [[ -x /usr/zuul-env/bin/zuul-cloner ]] && [[ "${ZUUL_REF:-none}" != "none" ]]; then
56 61
57 # Prepare the clonemap for zuul-cloner to use 62 # Prepare the clonemap for zuul-cloner to use
58 create_tests_clonemap 63 create_tests_clonemap
@@ -74,9 +79,22 @@ if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
74elif [[ ! -d tests/common ]]; then 79elif [[ ! -d tests/common ]]; then
75 80
76 # The tests repo doesn't need a clone, we can just 81 # The tests repo doesn't need a clone, we can just
77 # symlink it. 82 # symlink it. As zuul v3 clones into a folder called
78 if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then 83 # 'workspace' we have to use one of its environment
84 # variables to determine the project name.
85 if [[ "${ZUUL_SHORT_PROJECT_NAME:-none}" == "openstack-ansible-tests" ]] ||\
86 [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
79 ln -s ${WORKING_DIR} ${WORKING_DIR}/tests/common 87 ln -s ${WORKING_DIR} ${WORKING_DIR}/tests/common
88
89 # In zuul v3 any dependent repository is placed into
90 # /home/zuul/src/git.openstack.org, so we check to see
91 # if there is a tests checkout there already. If so, we
92 # symlink that and use it.
93 elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then
94 ln -s "${ZUUL_TESTS_CLONE_LOCATION}" ${WORKING_DIR}/tests/common
95
96 # Otherwise we're clearly not in zuul or using a previously setup
97 # repo in some way, so just clone it from upstream.
80 else 98 else
81 git clone \ 99 git clone \
82 https://git.openstack.org/openstack/openstack-ansible-tests \ 100 https://git.openstack.org/openstack/openstack-ansible-tests \
diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml
new file mode 100644
index 0000000..4c3149f
--- /dev/null
+++ b/zuul.d/project.yaml
@@ -0,0 +1,26 @@
1---
2# Copyright 2017, Rackspace US, Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16- project:
17 name: openstack/openstack-ansible-os_tacker
18 check:
19 jobs:
20 - openstack-ansible-linters
21 - openstack-ansible-functional-ubuntu-xenial
22 gate:
23 queue: openstack-ansible
24 jobs:
25 - openstack-ansible-linters
26 - openstack-ansible-functional-ubuntu-xenial