diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..d8f537d --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,36 @@ +- project: + templates: + - docs-on-readthedocs + - openstack-python-jobs + - openstack-python35-jobs-nonvoting + vars: + rtd_webhook_id: '61274' + check: + jobs: + - sqlalchemy-migrate-tox-py27sa07 + - sqlalchemy-migrate-devstack: + voting: false + gate: + jobs: + - sqlalchemy-migrate-tox-py27sa07 + +- job: + name: sqlalchemy-migrate-tox-py27sa07 + parent: tox + description: | + Run tests for sqlalchemy-migrate project. + + Uses tox with the ``py27sa07`` environment. + vars: + tox_envlist: py27sa07 + +- job: + name: sqlalchemy-migrate-devstack + parent: legacy-dsvm-base + run: playbooks/sqlalchemy-migrate-devstack-dsvm/run.yaml + post-run: playbooks/sqlalchemy-migrate-devstack-dsvm/post.yaml + timeout: 10800 + required-projects: + - openstack/devstack + - openstack/devstack-gate + - x/sqlalchemy-migrate diff --git a/playbooks/sqlalchemy-migrate-devstack-dsvm/post.yaml b/playbooks/sqlalchemy-migrate-devstack-dsvm/post.yaml new file mode 100644 index 0000000..e07f551 --- /dev/null +++ b/playbooks/sqlalchemy-migrate-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/sqlalchemy-migrate-devstack-dsvm/run.yaml b/playbooks/sqlalchemy-migrate-devstack-dsvm/run.yaml new file mode 100644 index 0000000..afdfa35 --- /dev/null +++ b/playbooks/sqlalchemy-migrate-devstack-dsvm/run.yaml @@ -0,0 +1,49 @@ +- hosts: all + name: Autoconverted job legacy-sqlalchemy-migrate-devstack-dsvm from old job gate-sqlalchemy-migrate-devstack-dsvm-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/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + https://opendev.org \ + openstack/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="x/sqlalchemy-migrate $PROJECTS" + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_FULL=1 + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + function pre_test_hook { + cd /opt/stack/new/sqlalchemy-migrate + sudo -H pip install . + } + export -f pre_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 }}'