diff --git a/.zuul.yaml b/.zuul.yaml index e14799487..5489694cc 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,111 +1,85 @@ - job: - name: mistral-devstack-dsvm - parent: legacy-dsvm-base - run: playbooks/legacy/mistral-devstack-dsvm/run.yaml - post-run: playbooks/legacy/mistral-devstack-dsvm/post.yaml - timeout: 4200 + name: mistral-devstack-base + parent: devstack + timeout: 7800 + vars: + devstack_plugins: + mistral: https://git.openstack.org/openstack/mistral + heat: https://git.openstack.org/openstack/heat + devstack_services: + heat: True + h-api: True + h-api-cfn: True + h-api-cw: True + h-eng: True + tox_environment: + IDENTITY_API_VERSION: 3 + PYTHONUNBUFFERED: 'true' + MISTRAL_USE_MOD_WSGI: True + MISTRAL_RPC_IMPLEMENTATION: oslo + MYSQL_ROOT_PW: secretdatabase required-projects: - openstack-dev/devstack - openstack-infra/devstack-gate - openstack/heat - openstack/mistral - - openstack/mistral-dashboard - openstack/python-mistralclient - - openstack/zaqar - - openstack/python-zaqarclient - openstack/mistral-tempest-plugin - job: - name: mistral-devstack-dsvm-kombu - parent: legacy-dsvm-base - run: playbooks/legacy/mistral-devstack-dsvm-kombu/run.yaml - post-run: playbooks/legacy/mistral-devstack-dsvm-kombu/post.yaml - timeout: 4200 + name: mistral-rally-task + parent: mistral-devstack-base + run: playbooks/rally/run.yaml + vars: + devstack_plugins: + rally: https://git.openstack.org/openstack/rally + tox_environment: + DEVSTACK_GATE_TEMPEST_LARGE_OPS: 0 + DEVSTACK_GATE_EXERCISES: 0 + RALLY_SCENARIO: task-{{ zuul.project.canonical_name }} + DEVSTACK_GATE_NEUTRON: 1 required-projects: - - openstack-dev/devstack - - openstack-infra/devstack-gate - - openstack/heat - - openstack/mistral - - openstack/mistral-dashboard - - openstack/python-mistralclient - - openstack/zaqar - - openstack/python-zaqarclient - - openstack/mistral-tempest-plugin - -- job: - name: mistral-devstack-dsvm-non-apache - parent: legacy-dsvm-base - run: playbooks/legacy/mistral-devstack-dsvm-non-apache/run.yaml - post-run: playbooks/legacy/mistral-devstack-dsvm-non-apache/post.yaml - timeout: 4200 - required-projects: - - openstack-dev/devstack - - openstack-infra/devstack-gate - - openstack/heat - - openstack/mistral - - openstack/mistral-dashboard - - openstack/python-mistralclient - - openstack/zaqar - - openstack/python-zaqarclient - - openstack/mistral-tempest-plugin + - openstack/rally - job: name: mistral-docker-buildimage - parent: legacy-publish-openstack-artifacts - run: playbooks/legacy/mistral-docker-buildimage/run.yaml - post-run: playbooks/legacy/mistral-docker-buildimage/post.yaml + parent: publish-openstack-artifacts + run: playbooks/docker-buildimage/run.yaml + post-run: playbooks/docker-buildimage/post.yaml timeout: 1800 required-projects: - openstack/mistral -- job: - name: mistral-ha - parent: legacy-base - run: playbooks/legacy/mistral-ha/run.yaml - timeout: 4200 +# This job does not work. We can come back to it later. +# - 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.yaml - post-run: playbooks/legacy/mistral-tox-unit-mysql/post.yaml - timeout: 2400 - required-projects: - - openstack/requirements + parent: openstack-tox + vars: + tox_envlist: unit-mysql - job: name: mistral-tox-unit-postgresql - parent: legacy-base - run: playbooks/legacy/mistral-tox-unit-postgresql/run.yaml - post-run: playbooks/legacy/mistral-tox-unit-postgresql/post.yaml - timeout: 2400 - required-projects: - - openstack/requirements - -- job: - name: rally-dsvm-mistral-task - parent: legacy-dsvm-base - run: playbooks/legacy/rally-dsvm-mistral-task/run.yaml - post-run: playbooks/legacy/rally-dsvm-mistral-task/post.yaml - timeout: 7800 - required-projects: - - openstack-infra/devstack-gate - - openstack/mistral - - openstack/mistral-dashboard - - openstack/python-mistralclient - - openstack/rally + parent: openstack-tox + vars: + tox_envlist: unit-postgresql + tox_environment: { CI_PROJECT: "{{ zuul['project']['name'] }}" } - project: - name: openstack/mistral check: jobs: - openstack-tox-cover: voting: false - - rally-dsvm-mistral-task: - voting: false - - mistral-devstack-dsvm - - mistral-devstack-dsvm-non-apache: + - mistral-devstack + - mistral-devstack-non-apache: branches: ^(?!stable/(newton|ocata)).*$ + - mistral-devstack-kombu: + branches: ^(?!stable/newton).*$ - mistral-tox-unit-mysql - mistral-tox-unit-postgresql # TripleO jobs that deploy Mistral. @@ -118,17 +92,18 @@ # failures, please reach us on #tripleo IRC channel. - tripleo-ci-centos-7-scenario003-multinode-oooq - tripleo-ci-centos-7-scenario003-multinode-oooq-container - - mistral-devstack-dsvm-kombu: - branches: ^(?!stable/newton).*$ + # Disable the rally job until it actually works + # - mistral-rally-task: + # voting: false gate: jobs: - - mistral-devstack-dsvm - - mistral-devstack-dsvm-non-apache + - mistral-devstack + - mistral-devstack-non-apache - mistral-tox-unit-mysql - mistral-tox-unit-postgresql - tripleo-ci-centos-7-scenario003-multinode-oooq - tripleo-ci-centos-7-scenario003-multinode-oooq-container - - mistral-devstack-dsvm-kombu + - mistral-devstack-kombu post: jobs: - mistral-docker-buildimage: @@ -137,5 +112,6 @@ jobs: - mistral-docker-buildimage: branches: master - - mistral-ha: - voting: false + # This job doesn't work yet. + # - mistral-ha: + # voting: false diff --git a/playbooks/legacy/mistral-docker-buildimage/post.yaml b/playbooks/docker-buildimage/post.yaml similarity index 73% rename from playbooks/legacy/mistral-docker-buildimage/post.yaml rename to playbooks/docker-buildimage/post.yaml index 512ab63ce..e880e6f97 100644 --- a/playbooks/legacy/mistral-docker-buildimage/post.yaml +++ b/playbooks/docker-buildimage/post.yaml @@ -7,9 +7,9 @@ state: directory delegate_to: localhost - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + - name: Copy files from {{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }} on node synchronize: - src: '{{ ansible_user_dir }}/workspace/' + src: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}/' dest: '{{ zuul.executor.work_root }}/artifacts/images' mode: pull copy_links: true diff --git a/playbooks/docker-buildimage/run.yaml b/playbooks/docker-buildimage/run.yaml new file mode 100644 index 000000000..26cfc61bb --- /dev/null +++ b/playbooks/docker-buildimage/run.yaml @@ -0,0 +1,6 @@ +- hosts: all + tasks: + - shell: + cmd: | + ./docker_image_build.sh + chdir: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}' diff --git a/playbooks/legacy/mistral-devstack-dsvm-kombu/post.yaml b/playbooks/legacy/mistral-devstack-dsvm-kombu/post.yaml deleted file mode 100644 index e07f5510a..000000000 --- a/playbooks/legacy/mistral-devstack-dsvm-kombu/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/mistral-devstack-dsvm-kombu/run.yaml b/playbooks/legacy/mistral-devstack-dsvm-kombu/run.yaml deleted file mode 100644 index c7a5dbe33..000000000 --- a/playbooks/legacy/mistral-devstack-dsvm-kombu/run.yaml +++ /dev/null @@ -1,82 +0,0 @@ -- 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 - cat << 'EOF' >>"/tmp/dg-local.conf" - [[local|localrc]] - TEMPEST_PLUGINS='/opt/stack/new/mistral-tempest-plugin' - 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_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 DEVSTACK_GATE_TEMPEST=1 - export PROJECTS="openstack/zaqar $PROJECTS" - export PROJECTS="openstack/python-zaqarclient $PROJECTS" - export PROJECTS="openstack/heat $PROJECTS" - export PROJECTS="openstack/mistral $PROJECTS" - export PROJECTS="openstack/mistral-dashboard $PROJECTS" - export PROJECTS="openstack/mistral-tempest-plugin $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" - export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin zaqar git://git.openstack.org/openstack/zaqar" - - 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 deleted file mode 100644 index e07f5510a..000000000 --- a/playbooks/legacy/mistral-devstack-dsvm-non-apache/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/mistral-devstack-dsvm-non-apache/run.yaml b/playbooks/legacy/mistral-devstack-dsvm-non-apache/run.yaml deleted file mode 100644 index 2fef857bd..000000000 --- a/playbooks/legacy/mistral-devstack-dsvm-non-apache/run.yaml +++ /dev/null @@ -1,82 +0,0 @@ -- 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 - cat << 'EOF' >>"/tmp/dg-local.conf" - [[local|localrc]] - TEMPEST_PLUGINS='/opt/stack/new/mistral-tempest-plugin' - 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_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 DEVSTACK_GATE_TEMPEST=1 - export PROJECTS="openstack/zaqar $PROJECTS" - export PROJECTS="openstack/python-zaqarclient $PROJECTS" - export PROJECTS="openstack/heat $PROJECTS" - export PROJECTS="openstack/mistral $PROJECTS" - export PROJECTS="openstack/mistral-dashboard $PROJECTS" - export PROJECTS="openstack/mistral-tempest-plugin $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" - export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin zaqar git://git.openstack.org/openstack/zaqar" - - 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 deleted file mode 100644 index e07f5510a..000000000 --- a/playbooks/legacy/mistral-devstack-dsvm/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/mistral-devstack-dsvm/run.yaml b/playbooks/legacy/mistral-devstack-dsvm/run.yaml deleted file mode 100644 index 65470394b..000000000 --- a/playbooks/legacy/mistral-devstack-dsvm/run.yaml +++ /dev/null @@ -1,82 +0,0 @@ -- 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 - cat << 'EOF' >>"/tmp/dg-local.conf" - [[local|localrc]] - TEMPEST_PLUGINS='/opt/stack/new/mistral-tempest-plugin' - 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_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 DEVSTACK_GATE_TEMPEST=1 - export PROJECTS="openstack/zaqar $PROJECTS" - export PROJECTS="openstack/python-zaqarclient $PROJECTS" - export PROJECTS="openstack/heat $PROJECTS" - export PROJECTS="openstack/mistral $PROJECTS" - export PROJECTS="openstack/mistral-dashboard $PROJECTS" - export PROJECTS="openstack/mistral-tempest-plugin $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" - export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin zaqar git://git.openstack.org/openstack/zaqar" - - 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/run.yaml b/playbooks/legacy/mistral-docker-buildimage/run.yaml deleted file mode 100644 index c3603f75d..000000000 --- a/playbooks/legacy/mistral-docker-buildimage/run.yaml +++ /dev/null @@ -1,48 +0,0 @@ -- 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-tox-unit-mysql/post.yaml b/playbooks/legacy/mistral-tox-unit-mysql/post.yaml deleted file mode 100644 index 68fbdf81b..000000000 --- a/playbooks/legacy/mistral-tox-unit-mysql/post.yaml +++ /dev/null @@ -1,67 +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=**/*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 deleted file mode 100644 index 9c7cdedcf..000000000 --- a/playbooks/legacy/mistral-tox-unit-mysql/run.yaml +++ /dev/null @@ -1,86 +0,0 @@ -- 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 deleted file mode 100644 index 68fbdf81b..000000000 --- a/playbooks/legacy/mistral-tox-unit-postgresql/post.yaml +++ /dev/null @@ -1,67 +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=**/*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 deleted file mode 100644 index c8bbca8c5..000000000 --- a/playbooks/legacy/mistral-tox-unit-postgresql/run.yaml +++ /dev/null @@ -1,86 +0,0 @@ -- 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 deleted file mode 100644 index 4c699fc12..000000000 --- a/playbooks/legacy/rally-dsvm-mistral-task/post.yaml +++ /dev/null @@ -1,41 +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 - - - 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 deleted file mode 100644 index bea5c2ade..000000000 --- a/playbooks/legacy/rally-dsvm-mistral-task/run.yaml +++ /dev/null @@ -1,71 +0,0 @@ -- 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 }}' diff --git a/playbooks/rally/run.yaml b/playbooks/rally/run.yaml new file mode 100644 index 000000000..0a02108ca --- /dev/null +++ b/playbooks/rally/run.yaml @@ -0,0 +1,12 @@ +- hosts: all + tasks: + - name: Run Devstack + include_role: + name: run-devstack + + - name: Run rally + shell: + cmd: | + ./tests/ci/rally-gate.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}/../rally' diff --git a/rally-jobs/task-mistral.yaml b/rally-jobs/task-mistral.yaml index 971094c5a..488c5728c 100644 --- a/rally-jobs/task-mistral.yaml +++ b/rally-jobs/task-mistral.yaml @@ -1,3 +1,4 @@ +{% set extra_dir = extra_dir or env["RALLY_EXTRA_DIR"] %} --- MistralWorkbooks.list_workbooks: - @@ -16,7 +17,7 @@ MistralWorkbooks.create_workbook: - args: - definition: "/home/jenkins/.rally/extra/mistral_wb.yaml" + definition: "{{ extra_dir }}/mistral_wb.yaml" runner: type: "constant" times: 50 @@ -31,7 +32,7 @@ - args: - definition: "/home/jenkins/.rally/extra/mistral_wb.yaml" + definition: "{{ extra_dir }}/mistral_wb.yaml" do_delete: true runner: type: "constant" @@ -62,7 +63,7 @@ MistralExecutions.create_execution_from_workbook: - args: - definition: "/home/jenkins/.rally/extra/mistral_wb.yaml" + definition: "{{ extra_dir }}/mistral_wb.yaml" do_delete: true runner: type: "constant" @@ -78,7 +79,7 @@ - args: - definition: "/home/jenkins/.rally/extra/nested_wb.yaml" + definition: "{{ extra_dir }}/nested_wb.yaml" workflow_name: "wrapping_wf" do_delete: true runner: @@ -95,10 +96,10 @@ - args: - definition: "/home/jenkins/.rally/extra/scenarios/complex_wf/complex_wf_wb.yaml" + definition: "{{ extra_dir }}/scenarios/complex_wf/complex_wf_wb.yaml" workflow_name: "top_level_workflow" params: - "/home/jenkins/.rally/extra/scenarios/complex_wf/complex_wf_params.json" + "{{ extra_dir }}/scenarios/complex_wf/complex_wf_params.json" do_delete: true runner: type: "constant" @@ -114,9 +115,9 @@ - args: - definition: "/home/jenkins/.rally/extra/scenarios/with_items/wb.yaml" + definition: "{{ extra_dir }}/scenarios/with_items/wb.yaml" params: - "/home/jenkins/.rally/extra/scenarios/with_items/count_100_concurrency_10.json" + "{{ extra_dir }}/scenarios/with_items/count_100_concurrency_10.json" do_delete: true runner: type: "constant" @@ -132,7 +133,7 @@ - args: - definition: "/home/jenkins/.rally/extra/scenarios/join/join_100_wb.yaml" + definition: "{{ extra_dir }}/scenarios/join/join_100_wb.yaml" do_delete: true runner: type: "constant" @@ -148,7 +149,7 @@ - args: - definition: "/home/jenkins/.rally/extra/scenarios/join/join_500_wb.yaml" + definition: "{{ extra_dir }}/scenarios/join/join_500_wb.yaml" do_delete: true runner: type: "constant" diff --git a/run_tests.sh b/run_tests.sh index a70805962..1ac826ac5 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -103,7 +103,7 @@ LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=C -ZUUL_PROJECT=${ZUUL_PROJECT:-""} +CI_PROJECT=${CI_PROJECT:-""} process_options $@ # Make our paths available to other scripts we call @@ -126,9 +126,9 @@ function setup_db { postgresql ) echo "Setting up Mistral DB in PostgreSQL" - # If ZUUL_PROJECT is specified it means that this script is executing on + # If CI_PROJECT is specified it means that this script is executing on # Jenkins gate, so we should use already created postgresql db - if ! [ -n "$ZUUL_PROJECT"] + if [ -n "$CI_PROJECT"] then echo "PostgreSQL is initialized. 'openstack_citest' db will be used." dbname="openstack_citest"