From 016fd7fa3ada00085ad70ed584441588fb5e5d97 Mon Sep 17 00:00:00 2001 From: Luka Peschke Date: Tue, 14 Nov 2017 16:52:08 +0100 Subject: [PATCH] Add a tempest plugin gate job This adds check and gate jobs using the new Tempest plugin to CloudKitty. The jobs are non-voting for now. Change-Id: I455eb7208fb97c140b94db9ae53f9da2cd87de82 --- .zuul.yaml | 22 ++++++++ playbooks/cloudkitty-tempest-full/post.yaml | 15 ++++++ playbooks/cloudkitty-tempest-full/run.yaml | 54 +++++++++++++++++++ .../add-tempest-plugin-3584e1918f344fb2.yaml | 5 ++ 4 files changed, 96 insertions(+) create mode 100644 .zuul.yaml create mode 100644 playbooks/cloudkitty-tempest-full/post.yaml create mode 100644 playbooks/cloudkitty-tempest-full/run.yaml create mode 100644 releasenotes/notes/add-tempest-plugin-3584e1918f344fb2.yaml diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 00000000..72975f14 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,22 @@ +- job: + name: cloudkitty-tempest-full + run: playbooks/cloudkitty-tempest-full/run.yaml + post-run: playbooks/cloudkitty-tempest-full/post.yaml + timeout: 5400 + parent: legacy-dsvm-base + required-projects: + - openstack-infra/devstack-gate + - openstack/cloudkitty + - openstack/cloudkitty-tempest-plugin + - openstack/python-cloudkittyclient + +- project: + name: openstack/cloudkitty + check: + jobs: + - cloudkitty-tempest-full: + voting: false + gate: + jobs: + - cloudkitty-tempest-full: + voting: false diff --git a/playbooks/cloudkitty-tempest-full/post.yaml b/playbooks/cloudkitty-tempest-full/post.yaml new file mode 100644 index 00000000..502ff570 --- /dev/null +++ b/playbooks/cloudkitty-tempest-full/post.yaml @@ -0,0 +1,15 @@ +- hosts: all + 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/cloudkitty-tempest-full/run.yaml b/playbooks/cloudkitty-tempest-full/run.yaml new file mode 100644 index 00000000..303cf5f5 --- /dev/null +++ b/playbooks/cloudkitty-tempest-full/run.yaml @@ -0,0 +1,54 @@ +- hosts: all + name: Run the whole cloudkitty-tempest-plugin test suite + 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 + + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_REGEX=cloudkitty_tempest_plugin + export KEEP_LOCALRC=1 + + export DEVSTACK_LOCAL_CONFIG="enable_plugin cloudkitty git://git.openstack.org/openstack/cloudkitty" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service ck-api, ck-proc" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"export TEMPEST_PLUGINS='/opt/stack/new/cloudkitty-tempest-plugin'" + + export PROJECTS="$PROJECTS openstack/cloudkitty" + export PROJECTS="$PROJECTS openstack/python-cloudkittyclient" + export PROJECTS="$PROJECTS openstack/cloudkitty-tempest-plugin" + + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + 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/releasenotes/notes/add-tempest-plugin-3584e1918f344fb2.yaml b/releasenotes/notes/add-tempest-plugin-3584e1918f344fb2.yaml new file mode 100644 index 00000000..894e3148 --- /dev/null +++ b/releasenotes/notes/add-tempest-plugin-3584e1918f344fb2.yaml @@ -0,0 +1,5 @@ +--- +other: + - | + A tempest plugin has been created for CloudKitty, and it is used + for gate tests.