diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..ecf7f38 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,33 @@ +- job: + name: ospurge-functional + parent: legacy-dsvm-base + run: playbooks/ospurge-functional/run.yaml + post-run: playbooks/ospurge-functional/post.yaml + timeout: 3600 + required-projects: + - openstack-infra/devstack-gate + - openstack/ospurge + irrelevant-files: &dsvm-irrelevant-files + - ^(test-|)requirements.txt$ + - ^.*\.rst$ + - ^.git.*$ + - ^\.testr.conf$ + - ^LICENSE$ + - ^doc/.*$ + - ^releasenotes/.*$ + - ^setup.cfg$ + - ^tox.ini$ + +- project: + templates: + - openstack-python35-jobs + - openstack-cover-jobs + - build-openstack-docs-pti + check: + jobs: + - openstack-tox-pep8 + - ospurge-functional + gate: + jobs: + - openstack-tox-pep8 + - ospurge-functional diff --git a/playbooks/ospurge-functional/post.yaml b/playbooks/ospurge-functional/post.yaml new file mode 100644 index 0000000..e07f551 --- /dev/null +++ b/playbooks/ospurge-functional/post.yaml @@ -0,0 +1,15 @@ +- 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/ospurge-functional/run.yaml b/playbooks/ospurge-functional/run.yaml new file mode 100644 index 0000000..57410ba --- /dev/null +++ b/playbooks/ospurge-functional/run.yaml @@ -0,0 +1,48 @@ +- hosts: all + 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=0 + export DEVSTACK_GATE_NEUTRON=1 + export BRANCH_OVERRIDE=default + export PROJECTS="openstack/ospurge $PROJECTS" + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + + function post_test_hook { + bash -xe $BASE/new/ospurge/tools/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/test-requirements.txt b/test-requirements.txt index d012fb8..c6cc08b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,7 @@ coverage>=4.0 # Apache-2.0 doc8 # Apache-2.0 hacking>=0.12.0,<0.13 # Apache-2.0 openstackdocstheme>=1.5.0 # Apache-2.0 -sphinx>=1.2.1,!=1.3b1,<1.4 # BSD +sphinx>=1.6.2 # BSD testrepository>=0.0.18 # Apache-2.0/BSD python-openstackclient>=3.16.1