From 5c68eec80ca4db1a3f39923ba494ff6743e5c611 Mon Sep 17 00:00:00 2001 From: Tovin Seven Date: Fri, 13 Oct 2017 16:13:38 +0700 Subject: [PATCH] Migrate to zuulv3 - move legacy jobs to project This patch do step 1 in the docs: Move Legacy Jobs to Projects. Change-Id: I22b4422104131f7e475c1c8ba1e7d69ec4f278b1 Needed-By: Ia59004029a44ad5109b15186b9cfa131ff519026 Needed-By: I87b55c19eae06553b21c89c06614dda341680248 --- .zuul.yaml | 21 ++++++++ .../post.yaml | 15 ++++++ .../run.yaml | 52 +++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 .zuul.yaml create mode 100644 playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/post.yaml create mode 100644 playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 00000000..451384c3 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,21 @@ +- project: + name: openstack/oslo.versionedobjects + check: + jobs: + - oslo.versionedobjects-src-grenade-devstack-multinode + +- job: + name: oslo.versionedobjects-src-grenade-devstack-multinode + parent: legacy-dsvm-base-multinode + voting: false + irrelevant-files: + - ^(test-|)requirements.txt$ + - ^setup.cfg$ + run: playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/run + post-run: playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/post + timeout: 10800 + required-projects: + - openstack-dev/grenade + - openstack-infra/devstack-gate + - openstack/oslo.versionedobjects + nodeset: legacy-ubuntu-xenial-2-node diff --git a/playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/post.yaml b/playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/post.yaml new file mode 100644 index 00000000..e07f5510 --- /dev/null +++ b/playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/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/oslo.versionedobjects-src-grenade-devstack-multinode/run.yaml b/playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/run.yaml new file mode 100644 index 00000000..72c0ddb4 --- /dev/null +++ b/playbooks/legacy/oslo.versionedobjects-src-grenade-devstack-multinode/run.yaml @@ -0,0 +1,52 @@ +- hosts: primary + name: Autoconverted job legacy-oslo.versionedobjects-src-grenade-dsvm-multinode + from old job gate-oslo.versionedobjects-src-grenade-dsvm-multinode-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 + export PROJECTS="openstack-dev/grenade $PROJECTS" + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_GRENADE=pullup + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + export DEVSTACK_GATE_TOPOLOGY="multinode" + export DEVSTACK_PROJECT_FROM_GIT=$ZUUL_SHORT_PROJECT_NAME + + # Even if the branch is overridden, make sure we use + # the correct branch using the OVERRIDE_*_PROJECT_BRANCH + # variable. + uc_project=`echo $DEVSTACK_PROJECT_FROM_GIT | tr [:lower:] [:upper:] | tr '-' '_' | sed 's/[^A-Z_]//'` + export "OVERRIDE_"$uc_project"_PROJECT_BRANCH"=$ZUUL_BRANCH + + 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 }}'