summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-11 13:18:37 +0000
committerGerrit Code Review <review@openstack.org>2019-03-11 13:18:37 +0000
commit66392a90df2d61adf780f3a95a7da37d639d227c (patch)
tree2dc2a25ec468da36889d4af8c786aed76c68a344
parent4af8a791f01176b4c1bb0c376fae2a97383695fc (diff)
parent2c349cc8930897052e66d29a70e1e7f1c4d40d79 (diff)
downloadpython-ironicclient-66392a90df2d61adf780f3a95a7da37d639d227c.tar.gz
Merge "Move to zuulv3"
-rwxr-xr-xironicclient/tests/functional/hooks/post_test_hook.sh49
-rw-r--r--playbooks/functional/run.yaml49
-rw-r--r--playbooks/legacy/ironicclient-dsvm-functional/post.yaml15
-rw-r--r--playbooks/legacy/ironicclient-dsvm-functional/run.yaml68
-rw-r--r--playbooks/legacy/ironicclient-tempest-dsvm-src/post.yaml15
-rw-r--r--playbooks/legacy/ironicclient-tempest-dsvm-src/run.yaml113
-rwxr-xr-xtools/run_functional.sh28
-rw-r--r--tox.ini1
-rw-r--r--zuul.d/ironicclient-jobs.yaml48
-rw-r--r--zuul.d/legacy-ironicclient-jobs.yaml42
-rw-r--r--zuul.d/project.yaml8
11 files changed, 102 insertions, 334 deletions
diff --git a/ironicclient/tests/functional/hooks/post_test_hook.sh b/ironicclient/tests/functional/hooks/post_test_hook.sh
deleted file mode 100755
index 77e4182..0000000
--- a/ironicclient/tests/functional/hooks/post_test_hook.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash -xe
-
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# This script is executed inside post_test_hook function in devstack gate.
-
-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 /usr/os-testr-env/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 IRONICCLIENT_DIR="$BASE/new/python-ironicclient"
-
-sudo chown -R $USER:stack $IRONICCLIENT_DIR
-
-cd $IRONICCLIENT_DIR
-
-# Run tests
-echo "Running ironicclient functional test suite"
-set +e
-
-# Only admin credentials needed for ironic api
-source $BASE/new/devstack/openrc admin admin
-
-# Preserve env for OS_ credentials
-sudo -E -H -u $USER ./tools/run_functional.sh
-EXIT_CODE=$?
-set -e
-
-# Collect and parse result
-generate_testr_results
-exit $EXIT_CODE
diff --git a/playbooks/functional/run.yaml b/playbooks/functional/run.yaml
new file mode 100644
index 0000000..baa830a
--- /dev/null
+++ b/playbooks/functional/run.yaml
@@ -0,0 +1,49 @@
+- hosts: all
+ tasks:
+ - shell:
+ cmd: |
+ set -e
+ set -x
+ export BASE='/opt/stack'
+ export IRONICCLIENT_DIR="$BASE/python-ironicclient"
+ sudo chmod -R a+rw /opt/stack/
+ cd $IRONICCLIENT_DIR
+ set +e
+ echo "Running ironicclient functional test suite"
+
+ # Only admin credentials needed for ironic api
+ source $BASE/devstack/openrc admin admin
+
+ FUNC_TEST_DIR=$IRONICCLIENT_DIR/ironicclient/tests/functional
+ CONFIG_FILE=$IRONICCLIENT_DIR/test.conf
+ echo 'Generating configuration file for functional tests'
+
+ if [[ -n "$IRONIC_URL" ]]; then
+ cat <<END >$CONFIG_FILE
+ [functional]
+ api_version = 1
+ auth_strategy=noauth
+ ironic_url=$IRONIC_URL
+ END
+ else
+ cat <<END >$CONFIG_FILE
+ [functional]
+ api_version = 1
+ os_auth_url=$OS_AUTH_URL
+ os_identity_api_version=$OS_IDENTITY_API_VERSION
+ os_username=$OS_USERNAME
+ os_password=$OS_PASSWORD
+ os_project_name=$OS_PROJECT_NAME
+ os_user_domain_id=$OS_USER_DOMAIN_ID
+ os_project_domain_id=$OS_PROJECT_DOMAIN_ID
+ os_service_type=baremetal
+ os_endpoint_type=public
+ END
+ fi
+ echo 'Configuration file is in '$CONFIG_FILE''
+ export IRONICCLIENT_TEST_CONFIG=$CONFIG_FILE
+
+ cd $IRONICCLIENT_DIR
+ tox -e functional
+ executable: /bin/bash
+ chdir: '/opt/stack/python-ironicclient'
diff --git a/playbooks/legacy/ironicclient-dsvm-functional/post.yaml b/playbooks/legacy/ironicclient-dsvm-functional/post.yaml
deleted file mode 100644
index e07f551..0000000
--- a/playbooks/legacy/ironicclient-dsvm-functional/post.yaml
+++ /dev/null
@@ -1,15 +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=/logs/**
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
diff --git a/playbooks/legacy/ironicclient-dsvm-functional/run.yaml b/playbooks/legacy/ironicclient-dsvm-functional/run.yaml
deleted file mode 100644
index 2fcd628..0000000
--- a/playbooks/legacy/ironicclient-dsvm-functional/run.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
-- hosts: all
- name: Autoconverted job legacy-ironicclient-dsvm-functional from old job gate-ironicclient-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]]
- enable_plugin ironic git://git.openstack.org/openstack/ironic
- IRONIC_DEPLOY_DRIVER=fake
- # neutron is not enabled here
- IRONIC_ENABLED_NETWORK_INTERFACES=noop
- IRONIC_DHCP_PROVIDER=none
-
- 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_TEMPEST=0
- export DEVSTACK_PROJECT_FROM_GIT=python-ironicclient
- export OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,ir-api,ir-cond
- export BRANCH_OVERRIDE=default
- if [ "$BRANCH_OVERRIDE" != "default" ] ; then
- export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
- fi
- export PROJECTS="openstack/ironic $PROJECTS"
-
- function post_test_hook {
- # Configure and run functional tests
- $BASE/new/python-ironicclient/ironicclient/tests/functional/hooks/post_test_hook.sh
- }
-
- 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/legacy/ironicclient-tempest-dsvm-src/post.yaml b/playbooks/legacy/ironicclient-tempest-dsvm-src/post.yaml
deleted file mode 100644
index e07f551..0000000
--- a/playbooks/legacy/ironicclient-tempest-dsvm-src/post.yaml
+++ /dev/null
@@ -1,15 +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=/logs/**
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
diff --git a/playbooks/legacy/ironicclient-tempest-dsvm-src/run.yaml b/playbooks/legacy/ironicclient-tempest-dsvm-src/run.yaml
deleted file mode 100644
index 9c0cf6d..0000000
--- a/playbooks/legacy/ironicclient-tempest-dsvm-src/run.yaml
+++ /dev/null
@@ -1,113 +0,0 @@
-- hosts: all
- name: Autoconverted job legacy-tempest-dsvm-python-ironicclient-src from old job
- gate-tempest-dsvm-python-ironicclient-src-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: |
- cat << 'EOF' >> ironic-extra-vars
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
- EOF
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- cat << 'EOF' >> ironic-extra-vars
- export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
-
- EOF
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- cat << 'EOF' >> ironic-extra-vars
- export DEVSTACK_PROJECT_FROM_GIT="python-ironicclient,$DEVSTACK_PROJECT_FROM_GIT"
-
- EOF
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- cat << 'EOF' >> ironic-vars-early
- # use tempest plugin
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
- export TEMPEST_CONCURRENCY=1
- EOF
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- export PROJECTS="openstack/ironic $PROJECTS"
- export PROJECTS="openstack/ironic-lib $PROJECTS"
- export PROJECTS="openstack/ironic-python-agent $PROJECTS"
- export PROJECTS="openstack/ironic-tempest-plugin $PROJECTS"
- export PROJECTS="openstack/python-ironicclient $PROJECTS"
- export PROJECTS="openstack/pyghmi $PROJECTS"
- export PROJECTS="openstack/virtualbmc $PROJECTS"
- export PYTHONUNBUFFERED=true
- export DEVSTACK_GATE_TEMPEST=1
- export DEVSTACK_GATE_IRONIC=1
- export DEVSTACK_GATE_NEUTRON=1
- export DEVSTACK_GATE_VIRT_DRIVER=ironic
- export DEVSTACK_GATE_CONFIGDRIVE=1
- export DEVSTACK_GATE_IRONIC_DRIVER=ipmi
- export BRANCH_OVERRIDE=default
- if [ "$BRANCH_OVERRIDE" != "default" ] ; then
- export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
- fi
-
- if [[ ! "stable/newton stable/ocata stable/pike" =~ $ZUUL_BRANCH ]] ; then
- export DEVSTACK_GATE_TLSPROXY=1
- fi
-
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_TEMPEST_WHOLE_DISK_IMAGE=False"
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=1"
- export DEVSTACK_GATE_IRONIC_BUILD_RAMDISK=0
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_BUILD_RAMDISK=False"
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=1"
-
- # Ensure the ironic-vars-EARLY file exists
- touch ironic-vars-early
- # Pull in the EARLY variables injected by the optional builders
- source ironic-vars-early
-
- export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic git://git.openstack.org/openstack/ironic"
-
- # Ensure the ironic-EXTRA-vars file exists
- touch ironic-extra-vars
- # Pull in the EXTRA variables injected by the optional builders
- source ironic-extra-vars
-
- 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/tools/run_functional.sh b/tools/run_functional.sh
deleted file mode 100755
index cf89a82..0000000
--- a/tools/run_functional.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-FUNC_TEST_DIR=$(dirname $0)/../ironicclient/tests/functional/
-CONFIG_FILE=$FUNC_TEST_DIR/test.conf
-
-if [[ -n "$IRONIC_URL" ]]; then
-cat <<END >$CONFIG_FILE
-[functional]
-api_version = 1
-auth_strategy=noauth
-ironic_url=$IRONIC_URL
-END
-else
-cat <<END >$CONFIG_FILE
-[functional]
-api_version = 1
-os_auth_url=$OS_AUTH_URL
-os_identity_api_version=$OS_IDENTITY_API_VERSION
-os_username=$OS_USERNAME
-os_password=$OS_PASSWORD
-os_project_name=$OS_PROJECT_NAME
-os_user_domain_id=$OS_USER_DOMAIN_ID
-os_project_domain_id=$OS_PROJECT_DOMAIN_ID
-os_service_type=baremetal
-os_endpoint_type=public
-END
-fi
-tox -e functional
diff --git a/tox.ini b/tox.ini
index 2985a87..eda34de 100644
--- a/tox.ini
+++ b/tox.ini
@@ -53,6 +53,7 @@ deps =
commands = {posargs}
[testenv:functional]
+passenv = *
setenv = TESTS_DIR=./ironicclient/tests/functional
LANGUAGE=en_US
diff --git a/zuul.d/ironicclient-jobs.yaml b/zuul.d/ironicclient-jobs.yaml
new file mode 100644
index 0000000..12e6ced
--- /dev/null
+++ b/zuul.d/ironicclient-jobs.yaml
@@ -0,0 +1,48 @@
+- job:
+ name: ironicclient-functional
+ parent: devstack-minimal
+ irrelevant-files:
+ - ^.*\.rst$
+ - ^doc/.*$
+ - ^ironicclient/locale/.*$
+ - ^ironicclient/tests/.*$
+ - ^releasenotes/.*$
+ - ^setup.cfg$
+ - ^tools/.*$
+ - ^tox.ini$
+ required-projects:
+ - openstack/ironic
+ - openstack/python-ironicclient
+ - openstack/keystone
+ - openstack/tempest
+ timeout: 4800
+ post-run: playbooks/functional/run.yaml
+ vars:
+ tox_environment:
+ PYTHONUNBUFFERED: 'true'
+ tox_envlist: functional
+ devstack_plugins:
+ ironic: git://git.openstack.org/openstack/ironic
+ devstack_localrc:
+ USE_PYTHON3: False
+ EBTABLES_RACE_FIX: True
+ IRONIC_ENABLED_NETWORK_INTERFACES: noop
+ IRONIC_DHCP_PROVIDER: none
+ IRONIC_DEPLOY_DRIVER: fake
+ INSTALL_TEMPEST: False
+ devstack_services:
+ key: True
+ mysql: True
+ rabbit: True
+
+
+- job:
+ name: ironicclient-tempest
+ parent: ironic-base
+ required-projects:
+ - openstack/python-ironicclient
+ timeout: 10800
+ vars:
+ devstack_localrc:
+ USE_PYTHON3: True
+ EBTABLES_RACE_FIX: True
diff --git a/zuul.d/legacy-ironicclient-jobs.yaml b/zuul.d/legacy-ironicclient-jobs.yaml
deleted file mode 100644
index 6981ba1..0000000
--- a/zuul.d/legacy-ironicclient-jobs.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
-- job:
- name: ironicclient-dsvm-functional
- parent: legacy-dsvm-base
- irrelevant-files:
- - ^.*\.rst$
- - ^doc/.*$
- - ^releasenotes/.*$
- required-projects:
- - openstack-infra/devstack-gate
- - openstack/ironic
- - openstack/python-ironicclient
- run: playbooks/legacy/ironicclient-dsvm-functional/run.yaml
- post-run: playbooks/legacy/ironicclient-dsvm-functional/post.yaml
- timeout: 4800
-
-- job:
- name: ironicclient-tempest-dsvm-src
- # NOTE: We do not use 'legacy-ironic-dsvm-base' as it is simpler and
- # less confusing to define it all here and use 'legacy-dsvm-base'.
- parent: legacy-dsvm-base
- irrelevant-files:
- - ^test-requirements.txt$
- - ^.*\.rst$
- - ^doc/.*$
- - ^ironicclient/tests/.*$
- - ^releasenotes/.*$
- - ^setup.cfg$
- - ^tools/.*$
- - ^tox.ini$
- required-projects:
- - openstack-infra/devstack-gate
- - openstack/ironic
- - openstack/ironic-lib
- - openstack/ironic-python-agent
- - openstack/ironic-tempest-plugin
- - openstack/pyghmi
- - openstack/python-ironicclient
- - openstack/tempest
- - openstack/virtualbmc
- run: playbooks/legacy/ironicclient-tempest-dsvm-src/run.yaml
- post-run: playbooks/legacy/ironicclient-tempest-dsvm-src/post.yaml
- timeout: 10800
diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml
index 8d5ff95..f5a5f52 100644
--- a/zuul.d/project.yaml
+++ b/zuul.d/project.yaml
@@ -12,10 +12,10 @@
- release-notes-jobs-python3
check:
jobs:
- - ironicclient-dsvm-functional
- - ironicclient-tempest-dsvm-src
+ - ironicclient-functional
+ - ironicclient-tempest
gate:
queue: ironic
jobs:
- - ironicclient-dsvm-functional
- - ironicclient-tempest-dsvm-src
+ - ironicclient-functional
+ - ironicclient-tempest