From 6dcaa64626b48447b8d84eac63a91a2ef8098707 Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Tue, 30 Jan 2018 06:48:33 +0000 Subject: [PATCH] Move zuulv3 jobs to project repo This patch moves the zuulv3 jobs for ec2-api repo. This is first step to switch jobs to ec2 tempest plugin. There is already gate broken due to switching neutron_vpnaas to neutron-tempest-plugin whichy stop any further updates to merge in ec2-api repo. This commit also fix that. To make this merge, legacy job needs to be remopved first. Done in below dependent patch: Depends-On: I0e5a1c37b407497fd9e60e58bac7c7a89e14dc75 Needed-By: I0c342072f7d749b0243889e2bedd636347df23ef Change-Id: I9c88ac1ecf0368c9ea7a8b20c84995ea29487184 --- .zuul.yaml | 44 +++++++++++- .../ec2-api-functional-neutron-full/post.yaml | 15 +++++ .../ec2-api-functional-neutron-full/run.yaml | 63 +++++++++++++++++ .../ec2-api-functional-neutron/post.yaml | 15 +++++ .../ec2-api-functional-neutron/run.yaml | 67 +++++++++++++++++++ .../legacy/ec2-api-rally-fakevirt/post.yaml | 41 ++++++++++++ .../legacy/ec2-api-rally-fakevirt/run.yaml | 66 ++++++++++++++++++ 7 files changed, 310 insertions(+), 1 deletion(-) create mode 100644 playbooks/legacy/ec2-api-functional-neutron-full/post.yaml create mode 100644 playbooks/legacy/ec2-api-functional-neutron-full/run.yaml create mode 100644 playbooks/legacy/ec2-api-functional-neutron/post.yaml create mode 100644 playbooks/legacy/ec2-api-functional-neutron/run.yaml create mode 100644 playbooks/legacy/ec2-api-rally-fakevirt/post.yaml create mode 100644 playbooks/legacy/ec2-api-rally-fakevirt/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 773edd22..7e330ab0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,7 +1,42 @@ +- job: + name: ec2-api-functional-neutron + parent: legacy-dsvm-base + run: playbooks/legacy/ec2-api-functional-neutron/run.yaml + post-run: playbooks/legacy/ec2-api-functional-neutron/post.yaml + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/ec2-api + - openstack/neutron + - openstack/neutron-tempest-plugin + +- job: + name: ec2-api-functional-neutron-full + parent: legacy-dsvm-base + run: playbooks/legacy/ec2-api-functional-neutron-full/run.yaml + post-run: playbooks/legacy/ec2-api-functional-neutron-full/post.yaml + timeout: 10800 + required-projects: + - openstack-infra/devstack-gate + - openstack/ec2-api + - openstack/neutron + - openstack/swift3 + +- job: + name: ec2-api-rally-fakevirt + parent: legacy-dsvm-base + run: playbooks/legacy/ec2-api-rally-fakevirt/run.yaml + post-run: playbooks/legacy/ec2-api-rally-fakevirt/post.yaml + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/ec2-api + - openstack/rally + - project: - name: openstack/ec2-api check: jobs: + - ec2-api-functional-neutron # TripleO jobs that deploy ec2-api. # Note we don't use a project-template here, so it's easier # to disable voting on one specific job if things go wrong. @@ -14,3 +49,10 @@ voting: false - tripleo-ci-centos-7-scenario002-multinode-oooq-container: voting: false + gate: + jobs: + - ec2-api-functional-neutron + experimental: + jobs: + - ec2-api-functional-neutron-full + - ec2-api-rally-fakevirt diff --git a/playbooks/legacy/ec2-api-functional-neutron-full/post.yaml b/playbooks/legacy/ec2-api-functional-neutron-full/post.yaml new file mode 100644 index 00000000..e07f5510 --- /dev/null +++ b/playbooks/legacy/ec2-api-functional-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/ec2-api-functional-neutron-full/run.yaml b/playbooks/legacy/ec2-api-functional-neutron-full/run.yaml new file mode 100644 index 00000000..039d9563 --- /dev/null +++ b/playbooks/legacy/ec2-api-functional-neutron-full/run.yaml @@ -0,0 +1,63 @@ +- hosts: all + name: Autoconverted job legacy-ec2-api-functional-neutron-dsvm-full from old job + ec2-api-functional-neutron-dsvm-full-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 ec2-api git://git.openstack.org/openstack/ec2-api + RUN_LONG_TESTS=1 + + 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 + + export PROJECTS="openstack/ec2-api $PROJECTS" + export PROJECTS="openstack/swift3 $PROJECTS" + export ENABLED_SERVICES+=,swift3 + + function post_test_hook { + source $BASE/new/devstack/accrc/admin/admin + cd /opt/stack/new/ec2-api/ + ./ec2api/tests/contrib/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/ec2-api-functional-neutron/post.yaml b/playbooks/legacy/ec2-api-functional-neutron/post.yaml new file mode 100644 index 00000000..e07f5510 --- /dev/null +++ b/playbooks/legacy/ec2-api-functional-neutron/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/ec2-api-functional-neutron/run.yaml b/playbooks/legacy/ec2-api-functional-neutron/run.yaml new file mode 100644 index 00000000..b664c7b2 --- /dev/null +++ b/playbooks/legacy/ec2-api-functional-neutron/run.yaml @@ -0,0 +1,67 @@ +- hosts: all + name: Autoconverted job legacy-functional-neutron-dsvm-ec2api from old job gate-functional-neutron-dsvm-ec2api-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 ec2-api git://git.openstack.org/openstack/ec2-api + enable_plugin neutron-tempest-plugin git://git.openstack.org/openstack/neutron-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_TEMPEST=1 + export TEMPEST_CONCURRENCY=2 + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + export PROJECTS="openstack/ec2-api $PROJECTS" + export PROJECTS="openstack/neutron-tempest-plugin $PROJECTS" + + if [ "neutron" = "neutron" ] ; then + export DEVSTACK_GATE_NEUTRON=1 + else + export DEVSTACK_GATE_NEUTRON=0 + fi + + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1 + export DEVSTACK_GATE_TEMPEST_REGEX="ec2api.tests.functional" + + 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/ec2-api-rally-fakevirt/post.yaml b/playbooks/legacy/ec2-api-rally-fakevirt/post.yaml new file mode 100644 index 00000000..4c699fc1 --- /dev/null +++ b/playbooks/legacy/ec2-api-rally-fakevirt/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/ec2-api-rally-fakevirt/run.yaml b/playbooks/legacy/ec2-api-rally-fakevirt/run.yaml new file mode 100644 index 00000000..583b9464 --- /dev/null +++ b/playbooks/legacy/ec2-api-rally-fakevirt/run.yaml @@ -0,0 +1,66 @@ +- hosts: all + name: Autoconverted job legacy-ec2-api-rally-dsvm-fakevirt from old job ec2-api-rally-dsvm-fakevirt-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 ec2-api git://git.openstack.org/openstack/ec2-api + enable_plugin rally git://git.openstack.org/openstack/rally + + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PROJECTS="openstack/ec2-api $PROJECTS" + export PROJECTS="openstack/rally $PROJECTS" + export DEVSTACK_GATE_VIRT_DRIVER=fake + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_TEMPEST_NOTESTS=1 + + export RALLY_SCENARIO=ec2-api-fakevirt + export CEILOMETER_NOTIFICATION_TOPICS=notifications,profiler + + function post_test_hook { + # run needed preparation steps for third-party project + if [ -f $BASE/new/ec2-api/rally-scenarios/post_test_hook.sh ] ; then + $BASE/new/ec2-api/rally-scenarios/post_test_hook.sh + fi + $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 }}'