From ec06717a5a47a4ed7e305390dc45f6c5a72b6477 Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Tue, 26 Mar 2019 20:09:40 +0000 Subject: [PATCH] Add gate job for stable/stein Now we have stable/stein branch ready for devstack and so does for all service projects. This commit adds the stable/stein job running for d-g gate. NOTE: Adding legacy job vesion of stable/stein because only legacy jobs use devstack-gate which is what we need to test. This commit removes the all stable zuulv3 native jobs which does not use devstack-gate and so does not required to be tested here. Change-Id: I546038fa4164a3085b33fa0ef30a51ec237bdc3f --- .zuul.yaml | 28 ++++----- .../legacy/tempest-neutron-full/post.yaml | 15 +++++ .../legacy/tempest-neutron-full/run.yaml | 63 +++++++++++++++++++ 3 files changed, 91 insertions(+), 15 deletions(-) create mode 100644 playbooks/legacy/tempest-neutron-full/post.yaml create mode 100644 playbooks/legacy/tempest-neutron-full/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index cbd37205..25fc9186 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -11,6 +11,16 @@ post-run: playbooks/devstack-gate-hooks/post.yaml timeout: 3900 +- job: + name: legacy-tempest-neutron-full-stable + parent: legacy-dsvm-base + run: playbooks/legacy/tempest-neutron-full/run.yaml + post-run: playbooks/legacy/tempest-neutron-full/post.yaml + timeout: 10800 + required-projects: + - openstack/devstack-gate + - openstack/neutron + - openstack/tempest - project: check: @@ -18,21 +28,9 @@ - devstack: files: - ^roles/ - - tempest-full-pike: - branches: ^(?!driverfixes/).*$ - voting: false - - tempest-full-queens: - branches: ^(?!driverfixes/).*$ - voting: false - - tempest-full-queens-py3: - branches: ^(?!driverfixes/).*$ - voting: false - - tempest-full-rocky: - branches: ^(?!driverfixes/).*$ - voting: false - - tempest-full-rocky-py3: - branches: ^(?!driverfixes/).*$ - voting: false - neutron-tempest-plugin-api: voting: false + - legacy-tempest-neutron-full-stable: + branches: ^(?!driverfixes/).*$ + voting: false - devstack-gate-hooks diff --git a/playbooks/legacy/tempest-neutron-full/post.yaml b/playbooks/legacy/tempest-neutron-full/post.yaml new file mode 100644 index 00000000..e07f5510 --- /dev/null +++ b/playbooks/legacy/tempest-neutron-full/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/tempest-neutron-full/run.yaml b/playbooks/legacy/tempest-neutron-full/run.yaml new file mode 100644 index 00000000..8d878cf0 --- /dev/null +++ b/playbooks/legacy/tempest-neutron-full/run.yaml @@ -0,0 +1,63 @@ +- hosts: all + name: legacy-tempest-neutron-full-stable + 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 + cat << 'EOF' >>"/tmp/dg-local.conf" + [[local|localrc]] + ENABLE_FILE_INJECTION=True + + 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_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_FULL=1 + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_TLSPROXY=1 + # NOTE(gmann): Overriding the branch to most recent + # stable branch. Idea here is to make sure devstack-gate + # which is used in legacy jobs for stable branches work + # fine. Testing it on most recent stable branch should + # be enough to make sure devstack-gate keep working for + # stable branch legacy jobs which are not yet migrated + # to Zuul v3 native jobs. + export BRANCH_OVERRIDE=stable/stein + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + 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 }}'