From b493fd4b85637f544221aa728de1f284a5f6a808 Mon Sep 17 00:00:00 2001 From: Nam Nguyen Hoai Date: Fri, 6 Oct 2017 11:39:41 +0700 Subject: [PATCH] Migrate to Zuul v3 Co-Authored-By: Dai Dang Van Change-Id: I446d1501596d2ea092cf2ff4de26695c464511ce --- .zuul.yaml | 135 ++++++++++++++++++ .../designate-devstack-agent-base/post.yaml | 15 ++ .../designate-devstack-agent-base/run.yaml | 66 +++++++++ .../legacy/designate-devstack-base/post.yaml | 15 ++ .../legacy/designate-devstack-base/run.yaml | 83 +++++++++++ .../post.yaml | 15 ++ .../grenade-devstack-designate-pdns4/run.yaml | 69 +++++++++ 7 files changed, 398 insertions(+) create mode 100644 .zuul.yaml create mode 100644 playbooks/legacy/designate-devstack-agent-base/post.yaml create mode 100644 playbooks/legacy/designate-devstack-agent-base/run.yaml create mode 100644 playbooks/legacy/designate-devstack-base/post.yaml create mode 100644 playbooks/legacy/designate-devstack-base/run.yaml create mode 100644 playbooks/legacy/grenade-devstack-designate-pdns4/post.yaml create mode 100644 playbooks/legacy/grenade-devstack-designate-pdns4/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 000000000..944bd1cd1 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,135 @@ +- job: + name: designate-devstack-base + parent: legacy-dsvm-base + vars: + database: mysql + python_version: py27 + identity_v3_only: 0 + worker_model: 0 + backend: pdns4 + required-projects: + - openstack-infra/devstack-gate + - openstack/designate + - openstack/designate-dashboard + - openstack/designate-tempest-plugin + - openstack/python-designateclient + - openstack/tempest + run: playbooks/legacy/designate-devstack-base/run.yaml + post-run: playbooks/legacy/designate-devstack-base/post.yaml + timeout: 4200 + +- job: + name: designate-devstack-agent-base + parent: legacy-dsvm-base + required-projects: + - openstack-infra/devstack-gate + - openstack/designate + - openstack/designate-dashboard + - openstack/designate-tempest-plugin + - openstack/python-designateclient + - openstack/tempest + run: playbooks/legacy/designate-devstack-agent-base/run.yaml + post-run: playbooks/legacy/designate-devstack-agent-base/post.yaml + timeout: 4200 + +- job: + name: grenade-devstack-designate-pdns4 + parent: legacy-dsvm-base + required-projects: + - openstack-dev/grenade + - openstack-infra/devstack-gate + - openstack/designate + - openstack/designate-dashboard + - openstack/designate-tempest-plugin + - openstack/python-designateclient + run: playbooks/legacy/grenade-devstack-designate-pdns4/run.yaml + post-run: playbooks/legacy/grenade-devstack-designate-pdns4/post.yaml + timeout: 10800 + +- job: + name: designate-devstack-agent-djbdns + parent: designate-devstack-agent-base + vars: + backend_driver: djbdns + +- job: + name: designate-devstack-agent-gdnsd + parent: designate-devstack-agent-base + vars: + backend_driver: gdnsd + +- job: + name: designate-devstack-agent-knot2 + parent: designate-devstack-agent-base + vars: + backend_driver: knot2 + +- job: + name: designate-devstack-bind9 + parent: designate-devstack-base + vars: + backend: bind9 + +- job: + name: designate-devstack-pdns4 + parent: designate-devstack-base + vars: + backend: pdns4 + +- job: + name: designate-devstack-pdns4-identity-v3-only + parent: designate-devstack-base + vars: + backend: pdns4 + identity_v3_only: 1 + +- job: + name: designate-devstack-pdns4-postgres + parent: designate-devstack-base + vars: + backend: pdns4 + database: postgres + +- job: + name: designate-devstack-pdns4-py35 + parent: designate-devstack-base + voting: false + vars: + backend: pdns4 + python_version: py35 + +- job: + name: designate-devstack-pdns4-worker-model + parent: designate-devstack-base + vars: + worker_model: 1 + +- project-template: + name: designate-devstack-jobs + check: + jobs: + - designate-devstack-bind9 + - designate-devstack-pdns4 + - designate-devstack-pdns4-postgres + - designate-devstack-pdns4-worker-model + - designate-devstack-pdns4-identity-v3-only + - designate-devstack-pdns4-py35 + - grenade-devstack-designate-pdns4 + gate: + queue: designate + - designate-devstack-bind9 + - designate-devstack-pdns4 + - designate-devstack-pdns4-postgres + - designate-devstack-pdns4-worker-model + - designate-devstack-pdns4-identity-v3-only + - grenade-devstack-designate-pdns4 + experimental: + jobs: + - designate-devstack-agent-knot2 + - designate-devstack-agent-djbdns + - designate-devstack-agent-gdnsd + +- project: + name: openstack/designate + templates: + - designate-devstack-jobs diff --git a/playbooks/legacy/designate-devstack-agent-base/post.yaml b/playbooks/legacy/designate-devstack-agent-base/post.yaml new file mode 100644 index 000000000..e07f5510a --- /dev/null +++ b/playbooks/legacy/designate-devstack-agent-base/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/designate-devstack-agent-base/run.yaml b/playbooks/legacy/designate-devstack-agent-base/run.yaml new file mode 100644 index 000000000..d75e631cd --- /dev/null +++ b/playbooks/legacy/designate-devstack-agent-base/run.yaml @@ -0,0 +1,66 @@ +- hosts: all + name: Designate devstack agent base + 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 designate git://git.openstack.org/openstack/designate + DESIGNATE_SERVICE_PORT_DNS=5322 + DESIGNATE_BACKEND_DRIVER=agent + DESIGNATE_AGENT_BACKEND_DRIVER={{ backend_driver }} + + 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_ALL_PLUGINS=1 + export DEVSTACK_GATE_TEMPEST_REGEX=designate + + export PROJECTS="openstack/designate $PROJECTS" + export PROJECTS="openstack/python-designateclient $PROJECTS" + export PROJECTS="openstack/designate-dashboard $PROJECTS" + export PROJECTS="openstack/designate-tempest-plugin $PROJECTS" + + export BRANCH_OVERRIDE=default + 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 }}' diff --git a/playbooks/legacy/designate-devstack-base/post.yaml b/playbooks/legacy/designate-devstack-base/post.yaml new file mode 100644 index 000000000..e07f5510a --- /dev/null +++ b/playbooks/legacy/designate-devstack-base/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/designate-devstack-base/run.yaml b/playbooks/legacy/designate-devstack-base/run.yaml new file mode 100644 index 000000000..847cccebc --- /dev/null +++ b/playbooks/legacy/designate-devstack-base/run.yaml @@ -0,0 +1,83 @@ +- hosts: all + name: Autoconverted job legacy-tempest-dsvm-designate-pdns4 from old job gate-tempest-dsvm-designate-pdns4-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 + export PYTHONUNBUFFERED=true + + services=rabbit,tempest,mysql,dstat,key + services+=,n-api,n-api-meta,n-cpu,n-cond,n-sch,n-crt + # placement service mandatory for nova from ocata + if [[ "stable/newton" != $ZUUL_BRANCH ]]; then + services+=,placement-api + fi + services+=,g-api,g-reg + services+=,c-sch,c-api,c-vol,c-bak + services+=,q-svc,q-dhcp,q-meta,q-agt,q-l3 + + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1 + export DEVSTACK_GATE_TEMPEST_REGEX=designate + + export DEVSTACK_LOCAL_CONFIG="enable_plugin designate git://git.openstack.org/openstack/designate" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"DESIGNATE_SERVICE_PORT_DNS=5322" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"DESIGNATE_BACKEND_DRIVER={{ backend }}" + + export PROJECTS="openstack/designate $PROJECTS" + export PROJECTS="openstack/python-designateclient $PROJECTS" + export PROJECTS="openstack/designate-dashboard $PROJECTS" + export PROJECTS="openstack/designate-tempest-plugin $PROJECTS" + + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + if [ "{{ identity_v3_only }}" == "1" ] ; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_IDENTITY_V2=False" + fi + + if [ "{{ worker_model }}" == "1" ] ; then + export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_service designate-worker designate-producer" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service designate-pool-manager designate-zone-manager" + fi + + export OVERRIDE_ENABLED_SERVICES=$services + + if [ "{{ database }}" == "postgres" ] ; then + export DEVSTACK_GATE_POSTGRES=1 + fi + + if [ "{{ python_version }}" == "py35" ] ; then + export DEVSTACK_GATE_USE_PYTHON3=True + 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 }}' diff --git a/playbooks/legacy/grenade-devstack-designate-pdns4/post.yaml b/playbooks/legacy/grenade-devstack-designate-pdns4/post.yaml new file mode 100644 index 000000000..e07f5510a --- /dev/null +++ b/playbooks/legacy/grenade-devstack-designate-pdns4/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/grenade-devstack-designate-pdns4/run.yaml b/playbooks/legacy/grenade-devstack-designate-pdns4/run.yaml new file mode 100644 index 000000000..9e0b9c952 --- /dev/null +++ b/playbooks/legacy/grenade-devstack-designate-pdns4/run.yaml @@ -0,0 +1,69 @@ +- hosts: all + name: Autoconverted job legacy-grenade-dsvm-designate-pdns4 from old job gate-grenade-dsvm-designate-pdns4-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]] + DESIGNATE_SERVICE_PORT_DNS=5322 + DESIGNATE_BACKEND_DRIVER=pdns4 + + 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_ALL_PLUGINS=1 + export DEVSTACK_GATE_GRENADE=pullup + export DEVSTACK_GATE_TEMPEST_REGEX=designate + export DEVSTACK_GATE_HORIZON=1 + + export PROJECTS="openstack/designate $PROJECTS" + export PROJECTS="openstack/python-designateclient $PROJECTS" + export PROJECTS="openstack/designate-dashboard $PROJECTS" + export PROJECTS="openstack/designate-tempest-plugin $PROJECTS" + export PROJECTS="openstack-dev/grenade $PROJECTS" + + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + export GRENADE_PLUGINRC="enable_grenade_plugin designate https://git.openstack.org/openstack/designate" + + 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 }}'