Browse Source

Add base role tests

Depends-On: https://review.openstack.org/#/c/554402/
Change-Id: I3b270cc65aedaf9ef7375289b0ff7373b2c8d705
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
changes/50/554350/14
Logan V 1 year ago
parent
commit
cebf3b3482
No account linked to committer's email address
11 changed files with 383 additions and 103 deletions
  1. 26
    15
      bindep.txt
  2. 10
    20
      doc/source/conf.py
  3. 15
    14
      releasenotes/source/conf.py
  4. 36
    51
      run_tests.sh
  5. 1
    1
      setup.cfg
  6. 26
    0
      tasks/main.yml
  7. 85
    2
      tests/test.yml
  8. 117
    0
      tests/tests-repo-clone.sh
  9. 20
    0
      vars/main.yml
  10. 17
    0
      vars/redhat-7.yml
  11. 30
    0
      zuul.d/project.yaml

+ 26
- 15
bindep.txt View File

@@ -2,40 +2,51 @@
2 2
 # before the execution of any tests.
3 3
 #
4 4
 # See the following for details:
5
-#  - http://docs.openstack.org/infra/bindep/
6
-#  - https://github.com/openstack-infra/bindep
5
+#  - https://docs.openstack.org/infra/bindep/
6
+#  - https://git.openstack.org/cgit/openstack-infra/bindep
7 7
 #
8 8
 # Even if the role does not make use of this facility, it
9 9
 # is better to have this file empty, otherwise OpenStack-CI
10 10
 # will fall back to installing its default packages which
11 11
 # will potentially be detrimental to the tests executed.
12
+#
13
+# Note:
14
+# This file is maintained in the openstack-ansible-tests repository.
15
+# https://git.openstack.org/cgit/openstack/openstack-ansible-tests/tree/bindep.txt
16
+# If you need to remove or add extra dependencies, you should modify
17
+# the central file instead and once your change is accepted then update
18
+# this file as well. The purpose of this file is to ensure that Python and
19
+# Ansible have all their necessary binary requirements on the test host before
20
+# tox executes. Any binary requirements needed by services/roles should be
21
+# installed by those roles in their applicable package install tasks, not through
22
+# using this file.
23
+#
24
+
25
+# The gcc compiler
26
+gcc
12 27
 
13 28
 # Base requirements for Ubuntu
14
-build-essential   [platform:dpkg]
15 29
 git-core          [platform:dpkg]
16 30
 libssl-dev        [platform:dpkg]
17 31
 libffi-dev        [platform:dpkg]
18 32
 python2.7         [platform:dpkg]
33
+python-apt        [platform:dpkg]
19 34
 python-dev        [platform:dpkg]
35
+python3           [platform:dpkg]
36
+python3-apt       [platform:dpkg]
37
+python3-dev       [platform:dpkg]
20 38
 
21
-# Base requirements for CentOS
22
-gcc               [platform:rpm]
39
+# Base requirements for RPM distros
23 40
 gcc-c++           [platform:rpm]
24 41
 git               [platform:rpm]
25
-python-devel      [platform:rpm]
26 42
 libffi-devel      [platform:rpm]
27 43
 openssl-devel     [platform:rpm]
44
+python-devel      [platform:rpm]
45
+python2-dnf       [platform:fedora]
28 46
 
29 47
 # For SELinux
30
-libselinux-python [platform:rpm]
31
-
32
-# For SSL SNI support
33
-python-pyasn1               [platform:dpkg]
34
-python-openssl              [platform:dpkg]
35
-python-ndg-httpsclient      [platform:ubuntu !platform:ubuntu-trusty]
36
-python2-pyasn1              [platform:rpm]
37
-python2-pyOpenSSL           [platform:rpm]
38
-python-ndg_httpsclient      [platform:rpm]
48
+libselinux-python [platform:redhat]
49
+libsemanage-python [platform:redhat]
39 50
 
40 51
 # Required for compressing collected log files in CI
41 52
 gzip

+ 10
- 20
doc/source/conf.py View File

@@ -22,7 +22,6 @@
22 22
 # All configuration values have a default; values that are commented out
23 23
 # serve to show the default.
24 24
 
25
-import openstackdocstheme
26 25
 import pbr.version
27 26
 import os
28 27
 
@@ -40,8 +39,8 @@ import os
40 39
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
41 40
 # ones.
42 41
 extensions = [
42
+    'openstackdocstheme',
43 43
     'sphinx.ext.autodoc',
44
-    'oslosphinx',
45 44
     'sphinxmark'
46 45
 ]
47 46
 
@@ -62,15 +61,17 @@ master_doc = 'index'
62 61
 # General information about the project.
63 62
 author = 'OpenStack-Ansible Contributors'
64 63
 category = 'Miscellaneous'
65
-copyright = '2014-2018, OpenStack-Ansible Contributors'
64
+copyright = '2014-2016, OpenStack-Ansible Contributors'
66 65
 description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
67 66
 project = 'OpenStack-Ansible'
68
-role_name = 'os_nova'
67
+role_name = 'systemd_networkd'
69 68
 target_name = 'openstack-ansible-' + role_name
70 69
 title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
71 70
 
72 71
 # The link to the browsable source code (for the left hand menu)
73
-oslosphinx_cgit_link = 'https://git.openstack.org/cgit/openstack/' + target_name
72
+oslosphinx_cgit_link = (
73
+    "https://git.openstack.org/cgit/openstack/{}".format(target_name)
74
+)
74 75
 
75 76
 # The version info for the project you're documenting, acts as replacement for
76 77
 # |version| and |release|, also used in various other places throughout the
@@ -83,21 +84,10 @@ release = version_info.version_string_with_vcs()
83 84
 # The short X.Y version.
84 85
 version = version_info.canonical_version_string()
85 86
 
86
-# A few variables have to be set for the log-a-bug feature.
87
-#   giturl: The location of conf.py on Git. Must be set manually.
88
-#   gitsha: The SHA checksum of the bug description.
89
-#           Automatically extracted from git log.
90
-#   bug_tag: Tag for categorizing the bug. Must be set manually.
91
-# These variables are passed to the logabug code via html_context.
92
-giturl = ("https://git.openstack.org/cgit/openstack/{0}"
93
-          "/tree/doc/source").format(target_name)
94
-git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
95
-gitsha = os.popen(git_cmd).read().strip('\n')
87
+# openstackdocstheme options
88
+repository_name = 'openstack/' + target_name
96 89
 bug_project = project.lower()
97
-bug_title = "Documentation bug"
98
-html_context = {"gitsha": gitsha, "giturl": giturl,
99
-                "bug_tag": "docs", "bug_title": bug_title,
100
-                "bug_project": bug_project}
90
+bug_tag = ''
101 91
 
102 92
 # The language for content autogenerated by Sphinx. Refer to documentation
103 93
 # for a list of supported languages.
@@ -156,7 +146,7 @@ html_theme = 'openstackdocs'
156 146
 # html_theme_options = {}
157 147
 
158 148
 # Add any paths that contain custom themes here, relative to this directory.
159
-html_theme_path = [openstackdocstheme.get_html_theme_path()]
149
+# html_theme_path = []
160 150
 
161 151
 # The name for this set of Sphinx documents.  If None, it defaults to
162 152
 # "<project> v<release> documentation".

+ 15
- 14
releasenotes/source/conf.py View File

@@ -22,8 +22,6 @@
22 22
 # All configuration values have a default; values that are commented out
23 23
 # serve to show the default.
24 24
 
25
-import pbr.version
26
-
27 25
 # If extensions (or modules to document with autodoc) are in another directory,
28 26
 # add these directories to sys.path here. If the directory is relative to the
29 27
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -38,7 +36,7 @@ import pbr.version
38 36
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
39 37
 # ones.
40 38
 extensions = [
41
-    'oslosphinx',
39
+    'openstackdocstheme',
42 40
     'reno.sphinxext',
43 41
 ]
44 42
 
@@ -57,7 +55,7 @@ master_doc = 'index'
57 55
 # General information about the project.
58 56
 author = 'OpenStack-Ansible Contributors'
59 57
 category = 'Miscellaneous'
60
-copyright = '2014-2018, OpenStack-Ansible Contributors'
58
+copyright = '2014-2016, OpenStack-Ansible Contributors'
61 59
 description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
62 60
 project = 'OpenStack-Ansible'
63 61
 role_name = 'systemd_networkd'
@@ -65,18 +63,21 @@ target_name = 'openstack-ansible-' + role_name
65 63
 title = 'OpenStack-Ansible Release Notes: ' + role_name + 'role'
66 64
 
67 65
 # The link to the browsable source code (for the left hand menu)
68
-oslosphinx_cgit_link = 'https://git.openstack.org/cgit/openstack/' + target_name
66
+oslosphinx_cgit_link = (
67
+    "https://git.openstack.org/cgit/openstack/{}".format(target_name)
68
+)
69 69
 
70
-# 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
72
-# built documents.
73
-#
74
-# The short X.Y version.
75
-version_info = pbr.version.VersionInfo(target_name)
70
+# Release notes do not need a version number in the title,
71
+# they cover multiple versions.
76 72
 # The full version, including alpha/beta/rc tags.
77
-release = version_info.version_string_with_vcs()
73
+release = ''
78 74
 # The short X.Y version.
79
-version = version_info.canonical_version_string()
75
+version = ''
76
+
77
+# openstackdocstheme options
78
+repository_name = 'openstack/' + target_name
79
+bug_project = project.lower()
80
+bug_tag = ''
80 81
 
81 82
 # The language for content autogenerated by Sphinx. Refer to documentation
82 83
 # for a list of supported languages.
@@ -121,7 +122,7 @@ pygments_style = 'sphinx'
121 122
 
122 123
 # The theme to use for HTML and HTML Help pages.  See the documentation for
123 124
 # a list of builtin themes.
124
-html_theme = 'default'
125
+html_theme = 'openstackdocs'
125 126
 
126 127
 # Theme options are theme-specific and customize the look and feel of a theme
127 128
 # further.  For a list of options available for each theme, see the

+ 36
- 51
run_tests.sh View File

@@ -1,5 +1,5 @@
1 1
 #!/usr/bin/env bash
2
-# Copyright 2018, Rackspace US, Inc.
2
+# Copyright 2015, Rackspace US, Inc.
3 3
 #
4 4
 # Licensed under the Apache License, Version 2.0 (the "License");
5 5
 # you may not use this file except in compliance with the License.
@@ -12,63 +12,48 @@
12 12
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 13
 # See the License for the specific language governing permissions and
14 14
 # limitations under the License.
15
+#
16
+# Note:
17
+# This file is maintained in the openstack-ansible-tests repository.
18
+# https://git.openstack.org/cgit/openstack/openstack-ansible-tests/tree/run_tests.sh
19
+# If you need to modify this file, update the one in the openstack-ansible-tests
20
+# repository and then update this file as well. The purpose of this file is to
21
+# prepare the host and then execute all the tox tests.
22
+#
23
+
24
+## Shell Opts ----------------------------------------------------------------
25
+set -xeu
26
+
27
+## Vars ----------------------------------------------------------------------
28
+
29
+export WORKING_DIR=${WORKING_DIR:-$(pwd)}
15 30
 
16
-set -xeuo pipefail
31
+## Main ----------------------------------------------------------------------
17 32
 
18
-FUNCTIONAL_TEST=${FUNCTIONAL_TEST:-true}
33
+source /etc/os-release || source /usr/lib/os-release
19 34
 
20
-# Install python2 for Ubuntu 16.04 and CentOS 7
21
-if which apt-get; then
22
-    sudo apt-get update && sudo apt-get install -y python
23
-fi
35
+install_pkg_deps() {
36
+    pkg_deps="git"
24 37
 
25
-if which yum; then
26
-    sudo yum install -y python
27
-fi
38
+    # Prefer dnf over yum for CentOS.
39
+    which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
28 40
 
29
-# Install pip.
30
-if ! which pip; then
31
-  curl --silent --show-error --retry 5 \
32
-    https://bootstrap.pypa.io/get-pip.py | sudo python2.7
33
-fi
41
+    case ${ID,,} in
42
+        *suse*) pkg_mgr_cmd="zypper -n in" ;;
43
+        centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;;
44
+        ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
45
+        *) echo "unsupported distribution: ${ID,,}"; exit 1 ;;
46
+    esac
34 47
 
35
-# Install bindep and tox with pip.
36
-sudo pip install bindep tox
48
+    eval sudo $pkg_mgr_cmd $pkg_deps
49
+}
37 50
 
38
-# CentOS 7 requires two additional packages:
39
-#   redhat-lsb-core - for bindep profile support
40
-#   epel-release    - required to install python-ndg_httpsclient/python2-pyasn1
41
-if which yum; then
42
-    sudo yum -y install redhat-lsb-core epel-release
43
-fi
51
+# Install the host distro package dependencies
52
+install_pkg_deps
44 53
 
45
-# Get a list of packages to install with bindep. If packages need to be
46
-# installed, bindep exits with an exit code of 1.
47
-BINDEP_PKGS=$(bindep -b -f bindep.txt test || true)
48
-echo "Packages to install: ${BINDEP_PKGS}"
54
+# Clone the tests repo for access to the common test script
55
+source tests/tests-repo-clone.sh
49 56
 
50
-# Install a list of OS packages provided by bindep.
51
-if which apt-get; then
52
-    sudo apt-get update
53
-    DEBIAN_FRONTEND=noninteractive \
54
-      sudo apt-get -q --option "Dpkg::Options::=--force-confold" \
55
-      --assume-yes install $BINDEP_PKGS
56
-elif which yum; then
57
-    # Don't run yum with an empty list of packages.
58
-    # It will fail and cause the script to exit with an error.
59
-    if [[ ${#BINDEP_PKGS} > 0 ]]; then
60
-      sudo yum install -y $BINDEP_PKGS
61
-    fi
62
-fi
57
+# Execute the common test script
58
+source tests/common/run_tests_common.sh
63 59
 
64
-# Loop through each tox environment and run tests.
65
-for tox_env in $(awk -F= '/envlist/ { gsub(",", " "); print $2 }' tox.ini); do
66
-  echo "Executing tox environment: ${tox_env}"
67
-  if [[ ${tox_env} == ansible-functional ]]; then
68
-    if ${FUNCTIONAL_TEST}; then
69
-      tox -e ${tox_env}
70
-    fi
71
-  else
72
-    tox -e ${tox_env}
73
-  fi
74
-done

+ 1
- 1
setup.cfg View File

@@ -2,7 +2,7 @@
2 2
 name = systemd_networkd
3 3
 summary = systemd_networkd for OpenStack Ansible
4 4
 description-file =
5
-    README.rst
5
+    README.md
6 6
 author = OpenStack
7 7
 author-email = openstack-dev@lists.openstack.org
8 8
 home-page = http://docs.openstack.org/developer/ansible-systemd_networkd/

+ 26
- 0
tasks/main.yml View File

@@ -13,6 +13,32 @@
13 13
 # See the License for the specific language governing permissions and
14 14
 # limitations under the License.
15 15
 
16
+- name: Gather variables for each operating system
17
+  include_vars: "{{ item }}"
18
+  with_first_found:
19
+    - files:
20
+        - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
21
+        - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
22
+        - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
23
+        - "{{ ansible_distribution | lower }}.yml"
24
+        - "{{ ansible_os_family | lower }}.yml"
25
+      skip: true
26
+  tags:
27
+    - always
28
+
29
+- name: Install networkd distro packages
30
+  package:
31
+    name: "{{ systemd_networkd_distro_packages }}"
32
+    state: "present"
33
+    update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
34
+    cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(600, omit) }}"
35
+  when:
36
+    - systemd_networkd_distro_packages | length > 0
37
+  register: install_packages
38
+  until: install_packages|success
39
+  retries: 3
40
+  delay: 2
41
+
16 42
 - name: Create systemd-networkd directory
17 43
   file:
18 44
     path: "/etc/systemd/network"

+ 85
- 2
tests/test.yml View File

@@ -1,5 +1,6 @@
1 1
 ---
2 2
 # Copyright 2018, Rackspace US, Inc.
3
+# Copyright 2018, Logan Vig <logan2211@gmail.com>
3 4
 #
4 5
 # Licensed under the Apache License, Version 2.0 (the "License");
5 6
 # you may not use this file except in compliance with the License.
@@ -13,7 +14,89 @@
13 14
 # See the License for the specific language governing permissions and
14 15
 # limitations under the License.
15 16
 
16
-- hosts: localhost
17
+- name: Playbook for role testing
18
+  hosts: localhost
19
+  connection: local
20
+  become: true
21
+  gather_facts: true
22
+  roles:
23
+    - role: "systemd_networkd"
24
+  post_tasks:
25
+    # Pause for 5 minutes to build app cache.
26
+    - name: Allow networkd to spin up
27
+      pause:
28
+        seconds: 15
29
+  vars:
30
+    systemd_networkd_distro_packages:
31
+      yum:
32
+        - systemd-networkd
33
+    systemd_run_networkd: yes
34
+    systemd_netdevs:
35
+      - NetDev:
36
+          Name: dummy0
37
+          Kind: dummy
38
+      - NetDev:
39
+          Name: dummy1
40
+          Kind: dummy
41
+      - NetDev:
42
+          Name: bond0
43
+          Kind: bond
44
+        Bond:
45
+          Mode: 802.3ad
46
+          TransmitHashPolicy: layer3+4
47
+          MIIMonitorSec: 1s
48
+          LACPTransmitRate: fast
49
+      - NetDev:
50
+          Name: br-dummy
51
+          Kind: bridge
52
+    systemd_networks:
53
+      - interface: "dummy0"
54
+        bond: "bond0"
55
+        mtu: 9000
56
+      - interface: "dummy1"
57
+        bond: "bond0"
58
+        mtu: 9000
59
+      - interface: "bond0"
60
+        bridge: "br-dummy"
61
+        mtu: 9000
62
+      - interface: "br-dummy"
63
+        address: "10.0.0.100"
64
+        netmask: "255.255.255.0"
65
+        gateway: "10.0.0.1"
66
+        mtu: 9000
67
+        usedns: true
68
+        static_routes:
69
+          - gateway: "10.1.0.1"
70
+            cidr: "10.1.0.0/24"
71
+        config_overrides:
72
+          Network:
73
+            ConfigureWithoutCarrier: true
74
+
75
+- name: Test networkd
76
+  hosts: localhost
77
+  connection: local
78
+  become: true
17 79
   gather_facts: true
18 80
   tasks:
19
-    - debug: msg=testing
81
+    - name: Interface check
82
+      assert:
83
+        that:
84
+          - ansible_dummy0['active'] == true
85
+          - ansible_dummy0['type'] == 'ether'
86
+          - ansible_dummy0['mtu'] == 9000
87
+          - ansible_dummy1['active'] == true
88
+          - ansible_dummy1['type'] == 'ether'
89
+          - ansible_dummy1['mtu'] == 9000
90
+    - name: Bond check
91
+      assert:
92
+        that:
93
+          - ansible_bond0['active'] == true
94
+          - ansible_bond0['type'] == 'bonding'
95
+          - ansible_bond0['mtu'] == 9000
96
+    - name: Bridge check
97
+      assert:
98
+        that:
99
+          - ansible_br_dummy['active'] == true
100
+          - ansible_br_dummy['type'] == 'bridge'
101
+          - ansible_br_dummy['ipv4']['address'] == '10.0.0.100'
102
+          - ansible_br_dummy['ipv4']['netmask'] == '255.255.255.0'

+ 117
- 0
tests/tests-repo-clone.sh View File

@@ -0,0 +1,117 @@
1
+#!/bin/bash
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
+# PURPOSE:
17
+# This script clones the openstack-ansible-tests repository to the
18
+# tests/common folder in order to be able to re-use test components
19
+# for role testing.
20
+
21
+# WARNING:
22
+# This file is maintained in the openstack-ansible-tests repository:
23
+# https://git.openstack.org/cgit/openstack/openstack-ansible-tests
24
+# If you need to change this script, then propose the change there.
25
+# Once it merges, the change will be replicated to the other repositories.
26
+
27
+## Shell Opts ----------------------------------------------------------------
28
+
29
+set -e
30
+
31
+## Vars ----------------------------------------------------------------------
32
+
33
+export TESTING_HOME=${TESTING_HOME:-$HOME}
34
+export WORKING_DIR=${WORKING_DIR:-$(pwd)}
35
+export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no}
36
+export ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/git.openstack.org/openstack/openstack-ansible-tests"
37
+
38
+## Functions -----------------------------------------------------------------
39
+
40
+function create_tests_clonemap {
41
+
42
+# Prepare the clonemap for zuul-cloner to use
43
+cat > ${TESTING_HOME}/tests-clonemap.yaml << EOF
44
+clonemap:
45
+  - name: openstack/openstack-ansible-tests
46
+    dest: ${WORKING_DIR}/tests/common
47
+EOF
48
+
49
+}
50
+
51
+## Main ----------------------------------------------------------------------
52
+
53
+# If zuul-cloner is present, use it so that we
54
+# also include any dependent patches from the
55
+# tests repo noted in the commit message.
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
60
+if [[ -x /usr/zuul-env/bin/zuul-cloner ]] && [[ "${ZUUL_REF:-none}" != "none" ]]; then
61
+
62
+    # Prepare the clonemap for zuul-cloner to use
63
+    create_tests_clonemap
64
+
65
+    # Execute the clone
66
+    /usr/zuul-env/bin/zuul-cloner \
67
+        --cache-dir /opt/git \
68
+        --map ${TESTING_HOME}/tests-clonemap.yaml \
69
+        git://git.openstack.org \
70
+        openstack/openstack-ansible-tests
71
+
72
+    # Clean up the clonemap.
73
+    rm -f ${TESTING_HOME}/tests-clonemap.yaml
74
+
75
+# Alternatively, use a simple git-clone. We do
76
+# not re-clone if the directory exists already
77
+# to prevent overwriting any local changes which
78
+# may have been made.
79
+elif [[ ! -d tests/common ]]; then
80
+
81
+    # The tests repo doesn't need a clone, we can just
82
+    # symlink it. As zuul v3 clones into a folder called
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
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.
98
+    else
99
+        git clone \
100
+            https://git.openstack.org/openstack/openstack-ansible-tests \
101
+            ${WORKING_DIR}/tests/common
102
+    fi
103
+fi
104
+
105
+# If this test set includes an upgrade test, the
106
+# previous stable release tests repo must also be
107
+# cloned.
108
+# Note:
109
+# Dependent patches to the previous stable release
110
+# tests repo are not supported.
111
+if [[ "${CLONE_UPGRADE_TESTS}" == "yes" ]]; then
112
+    if [[ ! -d "${WORKING_DIR}/tests/common/previous" ]]; then
113
+        git clone -b stable/queens \
114
+            https://git.openstack.org/openstack/openstack-ansible-tests \
115
+            ${WORKING_DIR}/tests/common/previous
116
+  fi
117
+fi

+ 20
- 0
vars/main.yml View File

@@ -0,0 +1,20 @@
1
+---
2
+# Copyright 2018, Logan Vig <logan2211@gmail.com>
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
+## APT Cache options
17
+cache_timeout: 600
18
+
19
+# Supporting package required to make systemd-networkd function
20
+systemd_networkd_distro_packages: []

+ 17
- 0
vars/redhat-7.yml View File

@@ -0,0 +1,17 @@
1
+---
2
+# Copyright 2018, Logan Vig <logan2211@gmail.com>
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
+systemd_networkd_distro_packages:
17
+  - systemd-networkd

+ 30
- 0
zuul.d/project.yaml View File

@@ -0,0 +1,30 @@
1
+# Copyright 2017, Rackspace US, Inc.
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License");
4
+# you may not use this file except in compliance with the License.
5
+# You may obtain a copy of the License at
6
+#
7
+#     http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+# See the License for the specific language governing permissions and
13
+# limitations under the License.
14
+
15
+- project:
16
+    check:
17
+      jobs:
18
+        - openstack-ansible-linters
19
+        - openstack-ansible-functional-centos-7
20
+        - openstack-ansible-functional-opensuse-423
21
+        - openstack-ansible-functional-ubuntu-xenial
22
+    experimental:
23
+      jobs:
24
+        - openstack-ansible-integrated-deploy-aio
25
+    gate:
26
+      jobs:
27
+        - openstack-ansible-linters
28
+        - openstack-ansible-functional-centos-7
29
+        - openstack-ansible-functional-opensuse-423
30
+        - openstack-ansible-functional-ubuntu-xenial

Loading…
Cancel
Save