diff --git a/.zuul.yaml b/.zuul.yaml index 2cf91eac..5f7424ea 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,3 +1,25 @@ +- job: + name: tricircle-functional + parent: legacy-dsvm-base + run: playbooks/tricircle-dsvm-functional/run.yaml + post-run: playbooks/tricircle-dsvm-functional/post.yaml + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/tricircle + +- job: + name: tricircle-multiregion + parent: legacy-dsvm-base-multinode + run: playbooks/tricircle-dsvm-multiregion/run.yaml + post-run: playbooks/tricircle-dsvm-multiregion/post.yaml + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/networking-sfc + - openstack/tricircle + nodeset: legacy-ubuntu-xenial-2-node + - project: templates: - openstack-cover-jobs @@ -9,9 +31,9 @@ - release-notes-jobs-python3 check: jobs: - - legacy-tricircle-dsvm-functional - - legacy-tricircle-dsvm-multiregion + - tricircle-functional + - tricircle-multiregion gate: jobs: - - legacy-tricircle-dsvm-functional - - legacy-tricircle-dsvm-multiregion + - tricircle-functional + - tricircle-multiregion diff --git a/playbooks/tricircle-dsvm-functional/post.yaml b/playbooks/tricircle-dsvm-functional/post.yaml new file mode 100644 index 00000000..dac87534 --- /dev/null +++ b/playbooks/tricircle-dsvm-functional/post.yaml @@ -0,0 +1,80 @@ +- 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/tricircle-dsvm-functional/run.yaml b/playbooks/tricircle-dsvm-functional/run.yaml new file mode 100644 index 00000000..877ad978 --- /dev/null +++ b/playbooks/tricircle-dsvm-functional/run.yaml @@ -0,0 +1,71 @@ +- hosts: all + name: Autoconverted job legacy-tricircle-dsvm-functional from old job gate-tricircle-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 tricircle git://git.openstack.org/openstack/tricircle + + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + export BRANCH_OVERRIDE=default + export PROJECTS="openstack/tricircle $PROJECTS" + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_TEMPEST=0 + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=0 + export DEVSTACK_GATE_TEMPEST_REGEX="tricircle.tempestplugin" + + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + function pre_test_hook { + cd /opt/stack/new/tricircle/tricircle/tempestplugin/ + ./pre_test_hook.sh + } + export -f pre_test_hook + + function post_test_hook { + cd /opt/stack/new/tricircle/tricircle/tempestplugin/ + ./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/tricircle-dsvm-multiregion/post.yaml b/playbooks/tricircle-dsvm-multiregion/post.yaml new file mode 100644 index 00000000..dac87534 --- /dev/null +++ b/playbooks/tricircle-dsvm-multiregion/post.yaml @@ -0,0 +1,80 @@ +- 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/tricircle-dsvm-multiregion/run.yaml b/playbooks/tricircle-dsvm-multiregion/run.yaml new file mode 100644 index 00000000..509e3eeb --- /dev/null +++ b/playbooks/tricircle-dsvm-multiregion/run.yaml @@ -0,0 +1,65 @@ +- hosts: primary + name: Autoconverted job legacy-tricircle-dsvm-multiregion from old job gate-tricircle-dsvm-multiregion-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 + export PYTHONUNBUFFERED=true + export PROJECTS="openstack/tricircle $PROJECTS" + export PROJECTS="openstack/networking-sfc $PROJECTS" + export DEVSTACK_GATE_CONFIGDRIVE=0 + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_TEMPEST=0 + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=0 + export DEVSTACK_GATE_TEMPEST_REGEX="tricircle.tempestplugin" + + # Keep localrc to be able to set some vars in pre_test_hook + export KEEP_LOCALRC=1 + + # Enable multinode mode, so that the subnode(the second node) + # will be configured to run as second region in pre_test_hook.sh + export DEVSTACK_GATE_TOPOLOGY="multinode" + + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + function gate_hook { + bash -xe $BASE/new/tricircle/tricircle/tempestplugin/gate_hook.sh + } + export -f gate_hook + + function post_test_hook { + bash -xe $BASE/new/tricircle/tricircle/tempestplugin/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 }}'