summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Evrard <jean-philippe@evrard.me>2017-10-17 16:49:34 +0000
committerJean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>2017-10-17 18:21:07 +0000
commit89319fd345abfa70d015873460e4e1a9feca2b18 (patch)
tree24b9435da1ea5703fa68be5c40c45e5d7239cd6d
parentefea06b81b74c6bde3ef61670a23401db5e3ed85 (diff)
Initial OSA zuul v3 role jobs
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. Change-Id: Iaee6f1c1836ee85770fd46a215e65cf2b2d517fa
Notes
Notes (review): Code-Review+2: Major Hayden <major@mhtx.net> Code-Review+2: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Workflow+1: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 17 Oct 2017 19:55:32 +0000 Reviewed-on: https://review.openstack.org/512713 Project: openstack/openstack-ansible-memcached_server 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.yaml28
5 files changed, 59 insertions, 21 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index bdfb2c8..5957d33 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -70,7 +70,9 @@ target_name = 'openstack-ansible-' + role_name
70title = 'OpenStack-Ansible Documentation: ' + role_name + 'role' 70title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
71 71
72# The link to the browsable source code (for the left hand menu) 72# The link to the browsable source code (for the left hand menu)
73oslosphinx_cgit_link = 'https://git.openstack.org/cgit/openstack/' + target_name 73oslosphinx_cgit_link = (
74 'https://git.openstack.org/cgit/openstack/{}'.format(target_name)
75)
74 76
75# The version info for the project you're documenting, acts as replacement for 77# The version info for the project you're documenting, acts as replacement for
76# |version| and |release|, also used in various other places throughout the 78# |version| and |release|, also used in various other places throughout the
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index dfd765a..646bb5e 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..a2bb30c
--- /dev/null
+++ b/zuul.d/project.yaml
@@ -0,0 +1,28 @@
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-memcached_server
18 check:
19 jobs:
20 - openstack-ansible-functional-centos-7
21 - openstack-ansible-functional-opensuse-423
22 - openstack-ansible-functional-ubuntu-xenial
23 gate:
24 queue: openstack-ansible
25 jobs:
26 - openstack-ansible-functional-centos-7
27 - openstack-ansible-functional-opensuse-423
28 - openstack-ansible-functional-ubuntu-xenial