summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.yaml110
-rw-r--r--doc/source/contributor/plugins.rst17
-rwxr-xr-xopenstackclient/tests/functional/post_test_hook.sh51
-rwxr-xr-xopenstackclient/tests/functional/post_test_hook_tips.sh55
-rw-r--r--playbooks/osc-devstack/post.yaml4
-rw-r--r--playbooks/osc-devstack/pre.yaml8
-rw-r--r--playbooks/osc-devstack/run.yaml3
-rw-r--r--playbooks/osc-functional-devstack-n-net/post.yaml80
-rw-r--r--playbooks/osc-functional-devstack-n-net/run.yaml85
-rw-r--r--playbooks/osc-functional-devstack-tips/post.yaml80
-rw-r--r--playbooks/osc-functional-devstack-tips/run.yaml90
-rw-r--r--playbooks/osc-functional-devstack/post.yaml80
-rw-r--r--playbooks/osc-functional-devstack/run.yaml83
-rw-r--r--tox.ini16
14 files changed, 122 insertions, 640 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 905af05b..ff268c21 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,38 +1,112 @@
-# from zuul.d/zuul-legacy-jobs.yaml legacy-osc-dsvm-functional
+- job:
+ name: osc-functional-devstack-base
+ parent: devstack
+ description: |
+ Base job for devstack-based functional tests
+ pre-run: playbooks/osc-devstack/pre
+ run: playbooks/osc-devstack/run
+ post-run: playbooks/osc-devstack/post
+ required-projects:
+ - name: openstack/swift
+ roles:
+ - zuul: openstack-infra/devstack
+ timeout: 9000
+ vars:
+ devstack_localrc:
+ SWIFT_HASH: "1234123412341234"
+ LIBS_FROM_GIT: 'python-openstackclient'
+ # NOTE(dtroyer): OSC needs to support Image v1 for a while yet so re-enable
+ GLANCE_V1_ENABLED: True
+ # NOTE(dtroyer): Functional tests need a bit more volume headroom
+ VOLUME_BACKING_FILE_SIZE: 20G
+ devstack_local_conf:
+ post-config:
+ "$CINDER_CONF":
+ DEFAULT:
+ # NOTE(dtroyer): OSC needs to support Volume v1 for a while yet so re-enable
+ enable_v1_api: True
+ devstack_services:
+ ceilometer-acentral: False
+ ceilometer-acompute: False
+ ceilometer-alarm-evaluator: False
+ ceilometer-alarm-notifier: False
+ ceilometer-anotification: False
+ ceilometer-api: False
+ ceilometer-collector: False
+ horizon: False
+ s-account: True
+ s-container: True
+ s-object: True
+ s-proxy: True
+ osc_environment:
+ PYTHONUNBUFFERED: 'true'
+ OS_CLOUD: 'devstack-admin'
+ tox_install_siblings: False
+ zuul_work_dir: src/git.openstack.org/openstack/python-openstackclient
+# The Neutron bits are here rather than in osc-functional-devstack-base to
+# simplify removing Neutron in the osc-functional-devstack-n-net job.
- job:
name: osc-functional-devstack
- parent: legacy-dsvm-base
- run: playbooks/osc-functional-devstack/run
- post-run: playbooks/osc-functional-devstack/post
+ parent: osc-functional-devstack-base
timeout: 7800
- required-projects:
- - openstack-infra/devstack-gate
- - openstack/python-openstackclient
+ vars:
+ devstack_plugins:
+ # NOTE(amotoki): Some neutron features are enabled by devstack plugin
+ neutron: https://git.openstack.org/openstack/neutron
+ devstack_services:
+ neutron-segments: True
+ q-metering: True
+ q-qos: True
+ tox_envlist: functional
- job:
name: osc-functional-devstack-n-net
- parent: legacy-dsvm-base
- run: playbooks/osc-functional-devstack-n-net/run
- post-run: playbooks/osc-functional-devstack-n-net/post
+ parent: osc-functional-devstack-base
timeout: 7800
- required-projects:
- - openstack-infra/devstack-gate
- - openstack/python-openstackclient
+ vars:
+ devstack_localrc:
+ FLAT_INTERFACE: 'br_flat'
+ PUBLIC_INTERFACE: 'br_pub'
+ devstack_services:
+ n-cell: True
+ n-net: True
+ neutron: False
+ neutron-segments: False
+ q-agt: False
+ q-dhcp: False
+ q-l3: False
+ q-meta: False
+ q-metering: False
+ q-qos: False
+ q-svc: False
+ tox_envlist: functional
- job:
name: osc-functional-devstack-tips
- parent: legacy-dsvm-base
- run: playbooks/osc-functional-devstack-tips/run
- post-run: playbooks/osc-functional-devstack-tips/post
+ parent: osc-functional-devstack
timeout: 7800
required-projects:
- - openstack-infra/devstack-gate
- openstack/os-client-config
- openstack/osc-lib
- openstack/python-openstackclient
- openstack/python-openstacksdk
-
+ vars:
+ devstack_localrc:
+ USE_PYTHON3: True
+ LIBS_FROM_GIT: 'python-openstackclient,python-openstacksdk,osc-lib,os-client-config'
+ # This is insufficient, but leaving it here as a reminder of what may
+ # someday be all we need to make this work
+ # disable_python3_package swift
+ DISABLED_PYTHON3_PACKAGES: 'swift'
+ devstack_services:
+ # Swift is not ready for python3 yet: At a minimum keystonemiddleware needs
+ # to be installed in the py2 env, there are probably other things too...
+ s-account: False
+ s-container: False
+ s-object: False
+ s-proxy: False
+ tox_envlist: functional-tips
- project:
name: openstack/python-openstackclient
diff --git a/doc/source/contributor/plugins.rst b/doc/source/contributor/plugins.rst
index e69dde8b..d847bf4a 100644
--- a/doc/source/contributor/plugins.rst
+++ b/doc/source/contributor/plugins.rst
@@ -217,16 +217,13 @@ more steps needed to fully integrate the client with openstackclient.
Add the command checker to your CI
----------------------------------
-#. Modify the section of ``zuul/layout.yaml`` related to your repository to
- add ``osc-plugin-jobs`` to the list of job templates for your project.
- This job checks that to see if any new commands are: duplicated, missing
- entry points, or have overlap; across all openstackclient plugins.
-
-#. Update ``jenkins/scripts/check-osc-plugins.sh`` to include your new
- library to be installed from source. This is essential in running the
- previously mentioned check job. Simply add
- ``install_from_source python-fooclient`` to the block of code where all
- other clients are installed.
+#. Add ``openstackclient-plugin-jobs`` to the list of job templates for your project.
+ These jobs ensures that all plugin libraries are co-installable with
+ ``python-openstackclient`` and checks for conflicts across all OpenStackClient
+ plugins, such as duplicated commands, missing entry points, or other overlaps.
+
+#. Add your project to the ``required-projects`` list in the ``.zuul.yaml`` file
+ in the ``openstack/openstackclient`` repo.
Changes to python-openstackclient
---------------------------------
diff --git a/openstackclient/tests/functional/post_test_hook.sh b/openstackclient/tests/functional/post_test_hook.sh
deleted file mode 100755
index d990cb99..00000000
--- a/openstackclient/tests/functional/post_test_hook.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# This is a script that kicks off a series of functional tests against an
-# OpenStack cloud. It will attempt to create an instance if one is not
-# available. Do not run this script unless you know what you're doing.
-# For more information refer to:
-# https://docs.openstack.org/python-openstackclient/latest/
-
-function generate_testr_results {
- if [ -f .testrepository/0 ]; then
- sudo .tox/functional/bin/testr last --subunit > $WORKSPACE/testrepository.subunit
- sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
- sudo .tox/functional/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
- sudo gzip -9 $BASE/logs/testrepository.subunit
- sudo gzip -9 $BASE/logs/testr_results.html
- sudo chown $USER:$USER $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- elif [ -f .stestr/0 ]; then
- sudo .tox/functional/bin/stestr last --subunit > $WORKSPACE/testrepository.subunit
- sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
- sudo .tox/functional/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
- sudo gzip -9 $BASE/logs/testrepository.subunit
- sudo gzip -9 $BASE/logs/testr_results.html
- sudo chown $USER:$USER $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- fi
-}
-
-export OPENSTACKCLIENT_DIR="$BASE/new/python-openstackclient"
-sudo chown -R $USER:stack $OPENSTACKCLIENT_DIR
-
-# Go to the openstackclient dir
-cd $OPENSTACKCLIENT_DIR
-
-# Run tests
-echo "Running openstackclient functional test suite"
-set +e
-
-# Source environment variables to kick things off
-source ~stack/devstack/openrc admin admin
-echo 'Running tests with:'
-env | grep OS
-
-# Preserve env for OS_ credentials
-sudo -E -H -u $USER tox -efunctional
-EXIT_CODE=$?
-set -e
-
-# Collect and parse result
-generate_testr_results
-exit $EXIT_CODE
diff --git a/openstackclient/tests/functional/post_test_hook_tips.sh b/openstackclient/tests/functional/post_test_hook_tips.sh
deleted file mode 100755
index 4cae7cdf..00000000
--- a/openstackclient/tests/functional/post_test_hook_tips.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-
-# This is a script that kicks off a series of functional tests against an
-# OpenStack cloud. It will attempt to create an instance if one is not
-# available. Do not run this script unless you know what you're doing.
-# For more information refer to:
-# https://docs.openstack.org/python-openstackclient/latest/
-
-# This particular script differs from the normal post_test_hook because
-# it installs the master (tip) version of osc-lib, os-client-config
-# and openstacksdk, OSCs most important dependencies.
-
-function generate_testr_results {
- if [ -f .testrepository/0 ]; then
- sudo .tox/functional-tips/bin/testr last --subunit > $WORKSPACE/testrepository.subunit
- sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
- sudo .tox/functional-tips/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
- sudo gzip -9 $BASE/logs/testrepository.subunit
- sudo gzip -9 $BASE/logs/testr_results.html
- sudo chown $USER:$USER $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- elif [ -f .stestr/0 ]; then
- sudo .tox/functional-tips/bin/stestr last --subunit > $WORKSPACE/testrepository.subunit
- sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit
- sudo .tox/functional-tips/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html
- sudo gzip -9 $BASE/logs/testrepository.subunit
- sudo gzip -9 $BASE/logs/testr_results.html
- sudo chown $USER:$USER $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- sudo chmod a+r $BASE/logs/testrepository.subunit.gz $BASE/logs/testr_results.html.gz
- fi
-}
-
-export OPENSTACKCLIENT_DIR="$BASE/new/python-openstackclient"
-sudo chown -R $USER:stack $OPENSTACKCLIENT_DIR
-
-# Go to the openstackclient dir
-cd $OPENSTACKCLIENT_DIR
-
-# Run tests
-echo "Running openstackclient functional-tips test suite"
-set +e
-
-# Source environment variables to kick things off
-source ~stack/devstack/openrc admin admin
-echo 'Running tests with:'
-env | grep OS
-
-# Preserve env for OS_ credentials
-sudo -E -H -u $USER tox -e functional-tips
-EXIT_CODE=$?
-set -e
-
-# Collect and parse result
-generate_testr_results
-exit $EXIT_CODE
diff --git a/playbooks/osc-devstack/post.yaml b/playbooks/osc-devstack/post.yaml
new file mode 100644
index 00000000..db7ca7d6
--- /dev/null
+++ b/playbooks/osc-devstack/post.yaml
@@ -0,0 +1,4 @@
+- hosts: all
+ roles:
+ - fetch-tox-output
+ - fetch-stestr-output
diff --git a/playbooks/osc-devstack/pre.yaml b/playbooks/osc-devstack/pre.yaml
new file mode 100644
index 00000000..3ec41c9c
--- /dev/null
+++ b/playbooks/osc-devstack/pre.yaml
@@ -0,0 +1,8 @@
+- hosts: all
+ roles:
+ - run-devstack
+ - role: bindep
+ bindep_profile: test
+ bindep_dir: "{{ zuul_work_dir }}"
+ - test-setup
+ - ensure-tox
diff --git a/playbooks/osc-devstack/run.yaml b/playbooks/osc-devstack/run.yaml
new file mode 100644
index 00000000..22f82096
--- /dev/null
+++ b/playbooks/osc-devstack/run.yaml
@@ -0,0 +1,3 @@
+- hosts: all
+ roles:
+ - tox
diff --git a/playbooks/osc-functional-devstack-n-net/post.yaml b/playbooks/osc-functional-devstack-n-net/post.yaml
deleted file mode 100644
index dac87534..00000000
--- a/playbooks/osc-functional-devstack-n-net/post.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
-- hosts: primary
- tasks:
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*nose_results.html
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*testr_results.html.gz
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/.testrepository/tmp*
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*testrepository.subunit.gz
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}/tox'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/.tox/*/log/*
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/logs/**
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
diff --git a/playbooks/osc-functional-devstack-n-net/run.yaml b/playbooks/osc-functional-devstack-n-net/run.yaml
deleted file mode 100644
index cb06ff81..00000000
--- a/playbooks/osc-functional-devstack-n-net/run.yaml
+++ /dev/null
@@ -1,85 +0,0 @@
-- hosts: all
- name: Autoconverted job legacy-osc-dsvm-functional-n-net from old job gate-osc-dsvm-functional-n-net-ubuntu-xenial-nv
- tasks:
-
- - name: Ensure legacy workspace directory
- file:
- path: '{{ ansible_user_dir }}/workspace'
- state: directory
-
- - shell:
- cmd: |
- set -e
- set -x
- cat > clonemap.yaml << EOF
- clonemap:
- - name: openstack-infra/devstack-gate
- dest: devstack-gate
- EOF
- /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
- git://git.openstack.org \
- openstack-infra/devstack-gate
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- cat << 'EOF' >>"/tmp/dg-local.conf"
- [[local|localrc]]
- # NOTE(RuiChen): nova-network only can be enable in nova cell v1
- enable_service n-net n-cell
- disable_service neutron q-svc q-agt q-dhcp q-l3 q-meta q-metering
- # NOTE(dtroyer): OSC needs to support Image v1 for a while yet so re-enable
- GLANCE_V1_ENABLED=True
- # NOTE(dtroyer): Functional tests need a bit more volume headroom
- VOLUME_BACKING_FILE_SIZE=20G
- # NOTE(dtroyer): OSC needs to support Volume v1 for a while yet so re-enable
- [[post-config|$CINDER_CONF]]
- [DEFAULT]
- enable_v1_api = True
-
- EOF
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- export PYTHONUNBUFFERED=true
- export DEVSTACK_GATE_UNSTACK=0
- export DEVSTACK_GATE_TEMPEST=0
- export DEVSTACK_GATE_EXERCISES=0
- export DEVSTACK_GATE_INSTALL_TESTONLY=1
- # NOTE(RuiChen): Explicitly tell devstack-gate that we need to run
- # the nova-network job with cell v1.
- export DEVSTACK_GATE_NEUTRON=0
- export DEVSTACK_GATE_CELLS=1
- export BRANCH_OVERRIDE=default
- export DEVSTACK_PROJECT_FROM_GIT=python-openstackclient
- if [ "$BRANCH_OVERRIDE" != "default" ] ; then
- export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
- fi
-
- function post_test_hook {
- # NOTE(stevemar): After the newton release was tagged the file was moved.
- # But, we run functional tests for various stable releases
- # (mitaka, and newton).
- # TODO(stevemar): Remove this check when Newton hits EOL.
- hook_location=$BASE/new/python-openstackclient/openstackclient/tests/functional/post_test_hook.sh
- if [ ! -f "$hook_location" ]; then
- hook_location=$BASE/new/python-openstackclient/post_test_hook.sh
- fi
- bash -xe $hook_location
- }
- export -f post_test_hook
-
- cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
- ./safe-devstack-vm-gate-wrap.sh
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
diff --git a/playbooks/osc-functional-devstack-tips/post.yaml b/playbooks/osc-functional-devstack-tips/post.yaml
deleted file mode 100644
index dac87534..00000000
--- a/playbooks/osc-functional-devstack-tips/post.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
-- hosts: primary
- tasks:
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*nose_results.html
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*testr_results.html.gz
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/.testrepository/tmp*
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*testrepository.subunit.gz
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}/tox'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/.tox/*/log/*
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/logs/**
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
diff --git a/playbooks/osc-functional-devstack-tips/run.yaml b/playbooks/osc-functional-devstack-tips/run.yaml
deleted file mode 100644
index 7bd53738..00000000
--- a/playbooks/osc-functional-devstack-tips/run.yaml
+++ /dev/null
@@ -1,90 +0,0 @@
-- hosts: all
- name: Autoconverted job legacy-osc-dsvm-functional-tips from old job gate-osc-dsvm-functional-tips-ubuntu-xenial-nv
- tasks:
-
- - name: Ensure legacy workspace directory
- file:
- path: '{{ ansible_user_dir }}/workspace'
- state: directory
-
- - shell:
- cmd: |
- set -e
- set -x
- cat > clonemap.yaml << EOF
- clonemap:
- - name: openstack-infra/devstack-gate
- dest: devstack-gate
- EOF
- /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
- git://git.openstack.org \
- openstack-infra/devstack-gate
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- cat << 'EOF' >>"/tmp/dg-local.conf"
- [[local|localrc]]
- # NOTE(amotoki): Some neutron features are enabled by devstack plugin
- enable_plugin neutron https://git.openstack.org/openstack/neutron
- enable_service q-qos
- enable_service neutron-segments
- # NOTE(dtroyer): OSC needs to support Image v1 for a while yet so re-enable
- GLANCE_V1_ENABLED=True
- # NOTE(dtroyer): Functional tests need a bit more volume headroom
- VOLUME_BACKING_FILE_SIZE=20G
- # Swift is not ready for python3 yet: At a minimum keystonemiddleware needs
- # to be installed in the py2 env, there are probably other things too...
- disable_service s-account
- disable_service s-container
- disable_service s-object
- disable_service s-proxy
- # This is insufficient, but leaving it here as a reminder of what may
- # someday be all we need to make this work
- disable_python3_package swift
- # NOTE(dtroyer): OSC needs to support Volume v1 for a while yet so re-enable
- [[post-config|$CINDER_CONF]]
- [DEFAULT]
- enable_v1_api = True
-
- EOF
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- export PYTHONUNBUFFERED=true
- export DEVSTACK_GATE_USE_PYTHON3=True
- export DEVSTACK_GATE_UNSTACK=0
- export DEVSTACK_GATE_TEMPEST=0
- export DEVSTACK_GATE_EXERCISES=0
- export DEVSTACK_GATE_INSTALL_TESTONLY=1
- export DEVSTACK_GATE_NEUTRON=1
- export BRANCH_OVERRIDE=default
- export DEVSTACK_PROJECT_FROM_GIT="python-openstackclient,python-openstacksdk,osc-lib,os-client-config"
- if [ "$BRANCH_OVERRIDE" != "default" ] ; then
- export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
- fi
-
- function post_test_hook {
- # This test hook will install the master version of the following:
- # - osc-lib
- # - openstacksdk
- # - os-client-config
- hook_location=$BASE/new/python-openstackclient/openstackclient/tests/functional/post_test_hook_tips.sh
- bash -xe $hook_location
- }
- export -f post_test_hook
-
- cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
- ./safe-devstack-vm-gate-wrap.sh
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
diff --git a/playbooks/osc-functional-devstack/post.yaml b/playbooks/osc-functional-devstack/post.yaml
deleted file mode 100644
index dac87534..00000000
--- a/playbooks/osc-functional-devstack/post.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
-- hosts: primary
- tasks:
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*nose_results.html
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*testr_results.html.gz
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/.testrepository/tmp*
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=**/*testrepository.subunit.gz
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}/tox'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/.tox/*/log/*
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/logs/**
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
diff --git a/playbooks/osc-functional-devstack/run.yaml b/playbooks/osc-functional-devstack/run.yaml
deleted file mode 100644
index 185ba437..00000000
--- a/playbooks/osc-functional-devstack/run.yaml
+++ /dev/null
@@ -1,83 +0,0 @@
-- hosts: all
- name: Autoconverted job legacy-osc-dsvm-functional from old job gate-osc-dsvm-functional-ubuntu-xenial
- tasks:
-
- - name: Ensure legacy workspace directory
- file:
- path: '{{ ansible_user_dir }}/workspace'
- state: directory
-
- - shell:
- cmd: |
- set -e
- set -x
- cat > clonemap.yaml << EOF
- clonemap:
- - name: openstack-infra/devstack-gate
- dest: devstack-gate
- EOF
- /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
- git://git.openstack.org \
- openstack-infra/devstack-gate
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- cat << 'EOF' >>"/tmp/dg-local.conf"
- [[local|localrc]]
- # NOTE(amotoki): Some neutron features are enabled by devstack plugin
- enable_plugin neutron https://git.openstack.org/openstack/neutron
- enable_service q-qos
- enable_service neutron-segments
- # NOTE(dtroyer): OSC needs to support Image v1 for a while yet so re-enable
- GLANCE_V1_ENABLED=True
- # NOTE(dtroyer): Functional tests need a bit more volume headroom
- VOLUME_BACKING_FILE_SIZE=20G
- # NOTE(dtroyer): OSC needs to support Volume v1 for a while yet so re-enable
- [[post-config|$CINDER_CONF]]
- [DEFAULT]
- enable_v1_api = True
-
- EOF
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- export PYTHONUNBUFFERED=true
- export DEVSTACK_GATE_UNSTACK=0
- export DEVSTACK_GATE_TEMPEST=0
- export DEVSTACK_GATE_EXERCISES=0
- export DEVSTACK_GATE_INSTALL_TESTONLY=1
- export DEVSTACK_GATE_NEUTRON=1
- export BRANCH_OVERRIDE=default
- export DEVSTACK_PROJECT_FROM_GIT=python-openstackclient
- if [ "$BRANCH_OVERRIDE" != "default" ] ; then
- export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
- fi
-
- function post_test_hook {
- # NOTE(stevemar): After the newton release was tagged the file was moved.
- # But, we run functional tests for various stable releases
- # (mitaka, and newton).
- # TODO(stevemar): Remove this check when Newton hits EOL.
- hook_location=$BASE/new/python-openstackclient/openstackclient/tests/functional/post_test_hook.sh
- if [ ! -f "$hook_location" ]; then
- hook_location=$BASE/new/python-openstackclient/post_test_hook.sh
- fi
- bash -xe $hook_location
- }
- export -f post_test_hook
-
- cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
- ./safe-devstack-vm-gate-wrap.sh
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
diff --git a/tox.ini b/tox.ini
index a16f0eb8..ca19862e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -56,20 +56,20 @@ commands =
[testenv:functional]
setenv = OS_TEST_PATH=./openstackclient/tests/functional
passenv = OS_*
-# Enable this when running Zuul v3 jobs
-#whitelist_externals = openstackclient/tests/functional/run_ostestr.sh
-#commands =
-# {toxinidir}/openstackclient/tests/functional/run_ostestr.sh {posargs}
+whitelist_externals = openstackclient/tests/functional/run_ostestr.sh
+commands =
+ {toxinidir}/openstackclient/tests/functional/run_ostestr.sh {posargs}
[testenv:functional-tips]
setenv = OS_TEST_PATH=./openstackclient/tests/functional
passenv = OS_*
+whitelist_externals = openstackclient/tests/functional/run_ostestr.sh
commands =
- pip install -q -U -e "git+file:///opt/stack/new/osc-lib#egg=osc_lib"
- pip install -q -U -e "git+file:///opt/stack/new/python-openstacksdk#egg=openstacksdk"
- pip install -q -U -e "git+file:///opt/stack/new/os-client-config#egg=os_client_config"
+ pip install -q -U -e "git+file://{toxinidir}/../osc-lib#egg=osc_lib"
+ pip install -q -U -e "git+file://{toxinidir}/../os-client-config#egg=os_client_config"
+ pip install -q -U -e "git+file://{toxinidir}/../python-openstacksdk#egg=openstacksdk"
pip freeze
- ostestr {posargs}
+ {toxinidir}/openstackclient/tests/functional/run_ostestr.sh {posargs}
[testenv:venv]
commands = {posargs}