From 098845e691284734fd24dae9b397a3a265a0e008 Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Mon, 2 Oct 2017 11:50:45 -0400 Subject: [PATCH] Migrate Mistral jobs to Zuul v3 Change-Id: I2164953581efad6da2354f781b0567d6125bc5aa Partial-Bug: #1720797 --- .zuul.yaml | 178 ++++++++++++++++++ .../mistral-devstack-dsvm-kombu/post.yaml | 15 ++ .../mistral-devstack-dsvm-kombu/run.yaml | 65 +++++++ .../post.yaml | 15 ++ .../mistral-devstack-dsvm-non-apache/run.yaml | 65 +++++++ .../legacy/mistral-devstack-dsvm/post.yaml | 15 ++ .../legacy/mistral-devstack-dsvm/run.yaml | 65 +++++++ .../mistral-docker-buildimage/post.yaml | 21 +++ .../legacy/mistral-docker-buildimage/run.yaml | 48 +++++ playbooks/legacy/mistral-ha/run.yaml | 55 ++++++ .../legacy/mistral-tox-unit-mysql/post.yaml | 67 +++++++ .../legacy/mistral-tox-unit-mysql/run.yaml | 86 +++++++++ .../mistral-tox-unit-postgresql/post.yaml | 67 +++++++ .../mistral-tox-unit-postgresql/run.yaml | 86 +++++++++ .../legacy/rally-dsvm-mistral-task/post.yaml | 41 ++++ .../legacy/rally-dsvm-mistral-task/run.yaml | 71 +++++++ 16 files changed, 960 insertions(+) create mode 100644 .zuul.yaml create mode 100644 playbooks/legacy/mistral-devstack-dsvm-kombu/post.yaml create mode 100644 playbooks/legacy/mistral-devstack-dsvm-kombu/run.yaml create mode 100644 playbooks/legacy/mistral-devstack-dsvm-non-apache/post.yaml create mode 100644 playbooks/legacy/mistral-devstack-dsvm-non-apache/run.yaml create mode 100644 playbooks/legacy/mistral-devstack-dsvm/post.yaml create mode 100644 playbooks/legacy/mistral-devstack-dsvm/run.yaml create mode 100644 playbooks/legacy/mistral-docker-buildimage/post.yaml create mode 100644 playbooks/legacy/mistral-docker-buildimage/run.yaml create mode 100644 playbooks/legacy/mistral-ha/run.yaml create mode 100644 playbooks/legacy/mistral-tox-unit-mysql/post.yaml create mode 100644 playbooks/legacy/mistral-tox-unit-mysql/run.yaml create mode 100644 playbooks/legacy/mistral-tox-unit-postgresql/post.yaml create mode 100644 playbooks/legacy/mistral-tox-unit-postgresql/run.yaml create mode 100644 playbooks/legacy/rally-dsvm-mistral-task/post.yaml create mode 100644 playbooks/legacy/rally-dsvm-mistral-task/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 000000000..49d44d908 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,178 @@ +- job: + name: mistral-devstack-dsvm + parent: legacy-dsvm-base + run: playbooks/legacy/mistral-devstack-dsvm/run + post-run: playbooks/legacy/mistral-devstack-dsvm/post + timeout: 4200 + required-projects: + - openstack-dev/devstack + - openstack-infra/devstack-gate + - openstack/heat + - openstack/mistral + - openstack/mistral-dashboard + - openstack/python-mistralclient + +- job: + name: mistral-devstack-dsvm-kombu + parent: legacy-dsvm-base + run: playbooks/legacy/mistral-devstack-dsvm-kombu/run + post-run: playbooks/legacy/mistral-devstack-dsvm-kombu/post + timeout: 4200 + required-projects: + - openstack-dev/devstack + - openstack-infra/devstack-gate + - openstack/heat + - openstack/mistral + - openstack/mistral-dashboard + - openstack/python-mistralclient + +- job: + name: mistral-devstack-dsvm-non-apache + parent: legacy-dsvm-base + run: playbooks/legacy/mistral-devstack-dsvm-non-apache/run + post-run: playbooks/legacy/mistral-devstack-dsvm-non-apache/post + timeout: 4200 + required-projects: + - openstack-dev/devstack + - openstack-infra/devstack-gate + - openstack/heat + - openstack/mistral + - openstack/mistral-dashboard + - openstack/python-mistralclient + +- job: + name: mistral-docker-buildimage + parent: legacy-publish-openstack-artifacts + run: playbooks/legacy/mistral-docker-buildimage/run + post-run: playbooks/legacy/mistral-docker-buildimage/post + timeout: 1800 + required-projects: + - openstack/mistral + +- job: + name: mistral-ha + parent: legacy-base + run: playbooks/legacy/mistral-ha/run + timeout: 4200 + +- job: + name: mistral-tox-unit-mysql + parent: legacy-base + run: playbooks/legacy/mistral-tox-unit-mysql/run + post-run: playbooks/legacy/mistral-tox-unit-mysql/post + timeout: 2400 + required-projects: + - openstack/requirements + +- job: + name: mistral-tox-unit-postgresql + parent: legacy-base + run: playbooks/legacy/mistral-tox-unit-postgresql/run + post-run: playbooks/legacy/mistral-tox-unit-postgresql/post + timeout: 2400 + required-projects: + - openstack/requirements + +- job: + name: rally-dsvm-mistral-task + parent: legacy-dsvm-base + run: playbooks/legacy/rally-dsvm-mistral-task/run + post-run: playbooks/legacy/rally-dsvm-mistral-task/post + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/mistral + - openstack/mistral-dashboard + - openstack/python-mistralclient + - openstack/rally + +- project: + name: openstack/mistral + templates: + - merge-check + - openstack-python-jobs + - openstack-python35-jobs + - publish-openstack-sphinx-docs + - experimental-tripleo-jobs + - check-requirements + - release-notes-jobs + check: + jobs: + - openstack-tox-cover: + voting: false + - rally-dsvm-mistral-task: + voting: false + - mistral-devstack-dsvm: + voting: false + - mistral-devstack-dsvm-non-apache: + voting: false + branches: ^(?!stable/(newton|ocata)).*$ + - mistral-tox-unit-mysql: + voting: false + - mistral-tox-unit-postgresql: + voting: false + - legacy-tripleo-ci-centos-7-scenario003-multinode-oooq-puppet: + branches: ^(?!stable/newton).*$ + irrelevant-files: + - ^.*\.md$ + - ^.*\.rst$ + - ^doc/.*$ + - ^etc/.*$ + - ^metadata.json$ + - ^releasenotes/.*$ + - ^test-requirements.txt$ + - mistral-devstack-dsvm-kombu: + voting: false + branches: ^(?!stable/newton).*$ + gate: + jobs: + - legacy-tripleo-ci-centos-7-scenario003-multinode-oooq-puppet: + branches: ^(?!stable/newton).*$ + irrelevant-files: + - ^.*\.md$ + - ^.*\.rst$ + - ^doc/.*$ + - ^etc/.*$ + - ^metadata.json$ + - ^releasenotes/.*$ + - ^test-requirements.txt$ + post: + jobs: + - mistral-docker-buildimage: + branches: master + experimental: + jobs: + - mistral-docker-buildimage: + branches: master + - mistral-ha: + voting: false + pre-release: + jobs: + - publish-openstack-python-tarball: + dependencies: + - publish-openstack-python-tarball + - legacy-announce-release: + dependencies: + - legacy-pypi-both-upload + - legacy-propose-update-constraints: + dependencies: + - legacy-pypi-both-upload + - legacy-pypi-both-upload: + dependencies: + - publish-openstack-python-tarball + - publish-openstack-python-tarball + release: + jobs: + - publish-openstack-python-tarball: + dependencies: + - publish-openstack-python-tarball + - legacy-announce-release: + dependencies: + - legacy-pypi-both-upload + - legacy-propose-update-constraints: + dependencies: + - legacy-pypi-both-upload + - legacy-pypi-both-upload: + dependencies: + - publish-openstack-python-tarball + - publish-openstack-python-tarball diff --git a/playbooks/legacy/mistral-devstack-dsvm-kombu/post.yaml b/playbooks/legacy/mistral-devstack-dsvm-kombu/post.yaml new file mode 100644 index 000000000..e07f5510a --- /dev/null +++ b/playbooks/legacy/mistral-devstack-dsvm-kombu/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/legacy/mistral-devstack-dsvm-kombu/run.yaml b/playbooks/legacy/mistral-devstack-dsvm-kombu/run.yaml new file mode 100644 index 000000000..0b84d9657 --- /dev/null +++ b/playbooks/legacy/mistral-devstack-dsvm-kombu/run.yaml @@ -0,0 +1,65 @@ +- hosts: all + name: Autoconverted job legacy-mistral-devstack-dsvm-kombu from old job gate-mistral-devstack-dsvm-kombu-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 + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_NEUTRON=1 + + if [ "mistral" = "python-mistralclient" ] ; then + # This puts the repo in PROJECTS + export DEVSTACK_PROJECT_FROM_GIT="python-mistralclient" + else + export PROJECTS="openstack/python-mistralclient $PROJECTS" + fi + + export ENABLED_SERVICES=heat,h-api,h-api-cfn,h-api-cw,h-eng,tempest + export PROJECTS="openstack/heat $PROJECTS" + export PROJECTS="openstack/mistral $PROJECTS" + export PROJECTS="openstack/mistral-dashboard $PROJECTS" + export DEVSTACK_LOCAL_CONFIG="enable_plugin mistral https://git.openstack.org/openstack/mistral" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat git://git.openstack.org/openstack/heat" + + if [ "-kombu" == "-non-apache" ]; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MISTRAL_USE_MOD_WSGI=False" + fi + + if [ "-kombu" == "-kombu" ]; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MISTRAL_RPC_IMPLEMENTATION=kombu" + fi + + function post_test_hook { + cd /opt/stack/new/mistral/functionaltests + ./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/mistral-devstack-dsvm-non-apache/post.yaml b/playbooks/legacy/mistral-devstack-dsvm-non-apache/post.yaml new file mode 100644 index 000000000..e07f5510a --- /dev/null +++ b/playbooks/legacy/mistral-devstack-dsvm-non-apache/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/legacy/mistral-devstack-dsvm-non-apache/run.yaml b/playbooks/legacy/mistral-devstack-dsvm-non-apache/run.yaml new file mode 100644 index 000000000..63de8bb51 --- /dev/null +++ b/playbooks/legacy/mistral-devstack-dsvm-non-apache/run.yaml @@ -0,0 +1,65 @@ +- hosts: all + name: Autoconverted job legacy-mistral-devstack-dsvm-non-apache from old job gate-mistral-devstack-dsvm-non-apache-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 + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_NEUTRON=1 + + if [ "mistral" = "python-mistralclient" ] ; then + # This puts the repo in PROJECTS + export DEVSTACK_PROJECT_FROM_GIT="python-mistralclient" + else + export PROJECTS="openstack/python-mistralclient $PROJECTS" + fi + + export ENABLED_SERVICES=heat,h-api,h-api-cfn,h-api-cw,h-eng,tempest + export PROJECTS="openstack/heat $PROJECTS" + export PROJECTS="openstack/mistral $PROJECTS" + export PROJECTS="openstack/mistral-dashboard $PROJECTS" + export DEVSTACK_LOCAL_CONFIG="enable_plugin mistral https://git.openstack.org/openstack/mistral" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat git://git.openstack.org/openstack/heat" + + if [ "-non-apache" == "-non-apache" ]; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MISTRAL_USE_MOD_WSGI=False" + fi + + if [ "-non-apache" == "-kombu" ]; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MISTRAL_RPC_IMPLEMENTATION=kombu" + fi + + function post_test_hook { + cd /opt/stack/new/mistral/functionaltests + ./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/mistral-devstack-dsvm/post.yaml b/playbooks/legacy/mistral-devstack-dsvm/post.yaml new file mode 100644 index 000000000..e07f5510a --- /dev/null +++ b/playbooks/legacy/mistral-devstack-dsvm/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/legacy/mistral-devstack-dsvm/run.yaml b/playbooks/legacy/mistral-devstack-dsvm/run.yaml new file mode 100644 index 000000000..2508aef2a --- /dev/null +++ b/playbooks/legacy/mistral-devstack-dsvm/run.yaml @@ -0,0 +1,65 @@ +- hosts: all + name: Autoconverted job legacy-mistral-devstack-dsvm from old job gate-mistral-devstack-dsvm-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 + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_NEUTRON=1 + + if [ "mistral" = "python-mistralclient" ] ; then + # This puts the repo in PROJECTS + export DEVSTACK_PROJECT_FROM_GIT="python-mistralclient" + else + export PROJECTS="openstack/python-mistralclient $PROJECTS" + fi + + export ENABLED_SERVICES=heat,h-api,h-api-cfn,h-api-cw,h-eng,tempest + export PROJECTS="openstack/heat $PROJECTS" + export PROJECTS="openstack/mistral $PROJECTS" + export PROJECTS="openstack/mistral-dashboard $PROJECTS" + export DEVSTACK_LOCAL_CONFIG="enable_plugin mistral https://git.openstack.org/openstack/mistral" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat git://git.openstack.org/openstack/heat" + + if [ "" == "-non-apache" ]; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MISTRAL_USE_MOD_WSGI=False" + fi + + if [ "" == "-kombu" ]; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MISTRAL_RPC_IMPLEMENTATION=kombu" + fi + + function post_test_hook { + cd /opt/stack/new/mistral/functionaltests + ./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/mistral-docker-buildimage/post.yaml b/playbooks/legacy/mistral-docker-buildimage/post.yaml new file mode 100644 index 000000000..512ab63ce --- /dev/null +++ b/playbooks/legacy/mistral-docker-buildimage/post.yaml @@ -0,0 +1,21 @@ +- hosts: primary + tasks: + + - name: Ensure artifacts directory exists + file: + path: '{{ zuul.executor.work_root }}/artifacts' + state: directory + delegate_to: localhost + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.work_root }}/artifacts/images' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/mistral-docker.tar.gz + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/mistral-docker-buildimage/run.yaml b/playbooks/legacy/mistral-docker-buildimage/run.yaml new file mode 100644 index 000000000..c3603f75d --- /dev/null +++ b/playbooks/legacy/mistral-docker-buildimage/run.yaml @@ -0,0 +1,48 @@ +- hosts: all + name: Autoconverted job legacy-mistral-docker-buildimage from old job gate-mistral-docker-buildimage + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + CLONEMAP=`mktemp` + function cleanup { + # In cases where zuul-cloner is aborted during a git + # clone operation, git will remove the git work tree in + # its cleanup. The work tree in these jobs is the + # workspace directory, which means that subsequent + # jenkins post-build actions can not run because the + # workspace has been removed. + # To reduce the likelihood of this having an impact, + # recreate the workspace directory if needed + mkdir -p $WORKSPACE + rm -f $CLONEMAP + } + trap cleanup EXIT + cat > $CLONEMAP << EOF + clonemap: + - name: $ZUUL_PROJECT + dest: . + EOF + /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ + git://git.openstack.org $ZUUL_PROJECT + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + ./docker_image_build.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/mistral-ha/run.yaml b/playbooks/legacy/mistral-ha/run.yaml new file mode 100644 index 000000000..dd95a56bc --- /dev/null +++ b/playbooks/legacy/mistral-ha/run.yaml @@ -0,0 +1,55 @@ +- hosts: all + name: Autoconverted job legacy-mistral-ha from old job gate-mistral-ha-ubuntu-xenial-nv + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + CLONEMAP=`mktemp` + function cleanup { + # In cases where zuul-cloner is aborted during a git + # clone operation, git will remove the git work tree in + # its cleanup. The work tree in these jobs is the + # workspace directory, which means that subsequent + # jenkins post-build actions can not run because the + # workspace has been removed. + # To reduce the likelihood of this having an impact, + # recreate the workspace directory if needed + mkdir -p $WORKSPACE + rm -f $CLONEMAP + } + trap cleanup EXIT + cat > $CLONEMAP << EOF + clonemap: + - name: $ZUUL_PROJECT + dest: . + EOF + /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ + git://git.openstack.org $ZUUL_PROJECT + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + # TODO: this is a temporary solution that puts all installation + # code into a script residing in mistral repo just for more + # convenient debugging (since we will be able to send patchsets to + # mistral with "check experimental" and trigger the gate). After + # it's ready it'll be better to create a special builder in this + # file. + ha_gate/install.sh + ha_gate/run_tests.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/mistral-tox-unit-mysql/post.yaml b/playbooks/legacy/mistral-tox-unit-mysql/post.yaml new file mode 100644 index 000000000..68fbdf81b --- /dev/null +++ b/playbooks/legacy/mistral-tox-unit-mysql/post.yaml @@ -0,0 +1,67 @@ +- 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 diff --git a/playbooks/legacy/mistral-tox-unit-mysql/run.yaml b/playbooks/legacy/mistral-tox-unit-mysql/run.yaml new file mode 100644 index 000000000..9c7cdedcf --- /dev/null +++ b/playbooks/legacy/mistral-tox-unit-mysql/run.yaml @@ -0,0 +1,86 @@ +- hosts: all + name: Autoconverted job legacy-mistral-tox-unit-mysql from old job gate-mistral-tox-unit-mysql-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + CLONEMAP=`mktemp` + REQS_DIR=`mktemp -d` + function cleanup { + mkdir -p $WORKSPACE + rm -rf $CLONEMAP $REQS_DIR + } + trap cleanup EXIT + cat > $CLONEMAP << EOF + clonemap: + - name: $ZUUL_PROJECT + dest: . + EOF + # zuul cloner works poorly if there are 2 names that are the + # same in here. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cat >> $CLONEMAP << EOF + - name: openstack/requirements + dest: $REQS_DIR + EOF + fi + /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ + git://git.openstack.org $ZUUL_PROJECT openstack/requirements + # REQS_DIR is not set for openstack/requirements and there is also + # no need to copy in this case. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cp $REQS_DIR/upper-constraints.txt ./ + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + if [ -x tools/test-setup.sh ] ; then + tools/test-setup.sh + fi + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -x + sudo rm -f /etc/sudoers.d/zuul + # Prove that general sudo access is actually revoked + ! sudo -n true + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/run-tox.sh unit-mysql + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + OUT=`git ls-files --other --exclude-standard --directory` + if [ -z "$OUT" ]; then + echo "No extra files created during test." + exit 0 + else + echo "The following un-ignored files were created during the test:" + echo "$OUT" + exit 0 # TODO: change to 1 to fail tests. + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/mistral-tox-unit-postgresql/post.yaml b/playbooks/legacy/mistral-tox-unit-postgresql/post.yaml new file mode 100644 index 000000000..68fbdf81b --- /dev/null +++ b/playbooks/legacy/mistral-tox-unit-postgresql/post.yaml @@ -0,0 +1,67 @@ +- 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 diff --git a/playbooks/legacy/mistral-tox-unit-postgresql/run.yaml b/playbooks/legacy/mistral-tox-unit-postgresql/run.yaml new file mode 100644 index 000000000..c8bbca8c5 --- /dev/null +++ b/playbooks/legacy/mistral-tox-unit-postgresql/run.yaml @@ -0,0 +1,86 @@ +- hosts: all + name: Autoconverted job legacy-mistral-tox-unit-postgresql from old job gate-mistral-tox-unit-postgresql-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + CLONEMAP=`mktemp` + REQS_DIR=`mktemp -d` + function cleanup { + mkdir -p $WORKSPACE + rm -rf $CLONEMAP $REQS_DIR + } + trap cleanup EXIT + cat > $CLONEMAP << EOF + clonemap: + - name: $ZUUL_PROJECT + dest: . + EOF + # zuul cloner works poorly if there are 2 names that are the + # same in here. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cat >> $CLONEMAP << EOF + - name: openstack/requirements + dest: $REQS_DIR + EOF + fi + /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ + git://git.openstack.org $ZUUL_PROJECT openstack/requirements + # REQS_DIR is not set for openstack/requirements and there is also + # no need to copy in this case. + if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then + cp $REQS_DIR/upper-constraints.txt ./ + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + if [ -x tools/test-setup.sh ] ; then + tools/test-setup.sh + fi + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -x + sudo rm -f /etc/sudoers.d/zuul + # Prove that general sudo access is actually revoked + ! sudo -n true + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: /usr/local/jenkins/slave_scripts/run-tox.sh unit-postgresql + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + OUT=`git ls-files --other --exclude-standard --directory` + if [ -z "$OUT" ]; then + echo "No extra files created during test." + exit 0 + else + echo "The following un-ignored files were created during the test:" + echo "$OUT" + exit 0 # TODO: change to 1 to fail tests. + fi + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/rally-dsvm-mistral-task/post.yaml b/playbooks/legacy/rally-dsvm-mistral-task/post.yaml new file mode 100644 index 000000000..4c699fc12 --- /dev/null +++ b/playbooks/legacy/rally-dsvm-mistral-task/post.yaml @@ -0,0 +1,41 @@ +- 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 + + - 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=/rally-plot/** + - --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=/rally-plot/extra/index.html + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/rally-dsvm-mistral-task/run.yaml b/playbooks/legacy/rally-dsvm-mistral-task/run.yaml new file mode 100644 index 000000000..bea5c2ade --- /dev/null +++ b/playbooks/legacy/rally-dsvm-mistral-task/run.yaml @@ -0,0 +1,71 @@ +- hosts: all + name: Autoconverted job legacy-rally-dsvm-mistral-task from old job gate-rally-dsvm-mistral-task-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]] + enable_plugin rally git://git.openstack.org/openstack/rally + enable_plugin mistral https://git.openstack.org/openstack/mistral + + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + + if [ $ZUUL_PROJECT == "openstack/rally" ] && [ $ZUUL_BRANCH != "master" ]; then + export DEVSTACK_GATE_FEATURE_MATRIX="/opt/stack/new/rally/devstack/features.yaml" + fi + + export PROJECTS="openstack/rally $PROJECTS" + export PROJECTS="openstack/mistral $PROJECTS" + export PROJECTS="openstack/mistral-dashboard $PROJECTS" + export PROJECTS="openstack/python-mistralclient $PROJECTS" + + export DEVSTACK_GATE_TEMPEST_LARGE_OPS=0 + export DEVSTACK_GATE_EXERCISES=0 + export RALLY_SCENARIO=$ZUUL_SHORT_PROJECT_NAME-mistral + + export IDENTITY_API_VERSION=3 + + export ENABLED_SERVICES=h-api,h-api-cfn,h-api-cw,h-eng,heat, + + function post_test_hook { + $BASE/new/rally/tests/ci/rally-gate.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 }}'