From 5eb4117a962019a57681d4a946dc93f916239e00 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 19 Mar 2025 11:52:38 +0000 Subject: [PATCH] zuul: Move legacy jobs to project These jobs need to be rewritten for zuulv3, but for now get them out of the openstack-zuul-jobs repo. Change-Id: I82ca395d57547df1a0e0aa4340a7309e348e4ef1 Signed-off-by: Stephen Finucane --- .zuul.yaml | 42 +++++++++- .../group-based-policy-dsvm-aim/post.yaml | 80 +++++++++++++++++++ .../group-based-policy-dsvm-aim/run.yaml | 59 ++++++++++++++ .../post.yaml | 80 +++++++++++++++++++ .../run.yaml | 59 ++++++++++++++ .../group-based-policy-dsvm-nfp/post.yaml | 80 +++++++++++++++++++ .../group-based-policy-dsvm-nfp/run.yaml | 59 ++++++++++++++ 7 files changed, 456 insertions(+), 3 deletions(-) create mode 100644 playbooks/legacy/group-based-policy-dsvm-aim/post.yaml create mode 100644 playbooks/legacy/group-based-policy-dsvm-aim/run.yaml create mode 100644 playbooks/legacy/group-based-policy-dsvm-functional/post.yaml create mode 100644 playbooks/legacy/group-based-policy-dsvm-functional/run.yaml create mode 100644 playbooks/legacy/group-based-policy-dsvm-nfp/post.yaml create mode 100644 playbooks/legacy/group-based-policy-dsvm-nfp/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 2ea91445c..335688de9 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,3 +1,39 @@ +- job: + name: group-based-policy-dsvm-aim + parent: legacy-dsvm-base + run: playbooks/legacy/group-based-policy-dsvm-aim/run.yaml + post-run: playbooks/legacy/group-based-policy-dsvm-aim/post.yaml + timeout: 7800 + required-projects: + - x/group-based-policy + - x/group-based-policy-automation + - x/group-based-policy-ui + - x/python-group-based-policy-client + +- job: + name: group-based-policy-dsvm-functional + parent: legacy-dsvm-base + run: playbooks/legacy/group-based-policy-dsvm-functional/run.yaml + post-run: playbooks/legacy/group-based-policy-dsvm-functional/post.yaml + timeout: 7800 + required-projects: + - x/group-based-policy + - x/group-based-policy-automation + - x/group-based-policy-ui + - x/python-group-based-policy-client + +- job: + name: group-based-policy-dsvm-nfp + parent: legacy-dsvm-base + run: playbooks/legacy/group-based-policy-dsvm-nfp/run.yaml + post-run: playbooks/legacy/group-based-policy-dsvm-nfp/post.yaml + timeout: 7800 + required-projects: + - x/group-based-policy + - x/group-based-policy-automation + - x/group-based-policy-ui + - x/python-group-based-policy-client + - project: name: x/group-based-policy templates: @@ -41,11 +77,11 @@ required-projects: - name: openstack/requirements override-checkout: stable/2024.1 - - legacy-group-based-policy-dsvm-functional: + - group-based-policy-dsvm-functional: voting: false - - legacy-group-based-policy-dsvm-aim: + - group-based-policy-dsvm-aim: voting: false - - legacy-group-based-policy-dsvm-nfp: + - group-based-policy-dsvm-nfp: voting: false gate: jobs: diff --git a/playbooks/legacy/group-based-policy-dsvm-aim/post.yaml b/playbooks/legacy/group-based-policy-dsvm-aim/post.yaml new file mode 100644 index 000000000..dac875340 --- /dev/null +++ b/playbooks/legacy/group-based-policy-dsvm-aim/post.yaml @@ -0,0 +1,80 @@ +- 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=**/*nose_results.html + - --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=**/*testr_results.html.gz + - --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=/.testrepository/tmp* + - --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=**/*testrepository.subunit.gz + - --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 }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --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=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/group-based-policy-dsvm-aim/run.yaml b/playbooks/legacy/group-based-policy-dsvm-aim/run.yaml new file mode 100644 index 000000000..30f8d3357 --- /dev/null +++ b/playbooks/legacy/group-based-policy-dsvm-aim/run.yaml @@ -0,0 +1,59 @@ +- hosts: all + name: Autoconverted job legacy-group-based-policy-dsvm-aim from old job gate-group-based-policy-dsvm-aim-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/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 DEVSTACK_GATE_UNSTACK=1 + export DEVSTACK_GATE_TEMPEST=0 + export DEVSTACK_GATE_EXERCISES=0 + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_INSTALL_TESTONLY=1 + export PROJECTS="x/group-based-policy $PROJECTS" + export PROJECTS="x/group-based-policy-automation $PROJECTS" + export PROJECTS="x/group-based-policy-ui $PROJECTS" + export PROJECTS="x/python-group-based-policy-client $PROJECTS" + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + function gate_hook { + bash -xe $BASE/new/group-based-policy/gbpservice/tests/contrib/gate_aim_hook.sh dsvm-aim + } + export -f gate_hook + + function post_test_hook { + bash -xe $BASE/new/group-based-policy/gbpservice/tests/contrib/post_test_hook.sh dsvm-aim + } + 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/group-based-policy-dsvm-functional/post.yaml b/playbooks/legacy/group-based-policy-dsvm-functional/post.yaml new file mode 100644 index 000000000..dac875340 --- /dev/null +++ b/playbooks/legacy/group-based-policy-dsvm-functional/post.yaml @@ -0,0 +1,80 @@ +- 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=**/*nose_results.html + - --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=**/*testr_results.html.gz + - --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=/.testrepository/tmp* + - --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=**/*testrepository.subunit.gz + - --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 }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --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=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/group-based-policy-dsvm-functional/run.yaml b/playbooks/legacy/group-based-policy-dsvm-functional/run.yaml new file mode 100644 index 000000000..2858606ae --- /dev/null +++ b/playbooks/legacy/group-based-policy-dsvm-functional/run.yaml @@ -0,0 +1,59 @@ +- hosts: all + name: Autoconverted job legacy-group-based-policy-dsvm-functional from old job gate-group-based-policy-dsvm-functional-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/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 DEVSTACK_GATE_UNSTACK=1 + export DEVSTACK_GATE_TEMPEST=0 + export DEVSTACK_GATE_EXERCISES=0 + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_INSTALL_TESTONLY=1 + export PROJECTS="x/group-based-policy $PROJECTS" + export PROJECTS="x/group-based-policy-automation $PROJECTS" + export PROJECTS="x/group-based-policy-ui $PROJECTS" + export PROJECTS="x/python-group-based-policy-client $PROJECTS" + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + function gate_hook { + bash -xe $BASE/new/group-based-policy/gbpservice/tests/contrib/gate_hook.sh dsvm-functional + } + export -f gate_hook + + function post_test_hook { + bash -xe $BASE/new/group-based-policy/gbpservice/tests/contrib/post_test_hook.sh dsvm-functional + } + 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/group-based-policy-dsvm-nfp/post.yaml b/playbooks/legacy/group-based-policy-dsvm-nfp/post.yaml new file mode 100644 index 000000000..dac875340 --- /dev/null +++ b/playbooks/legacy/group-based-policy-dsvm-nfp/post.yaml @@ -0,0 +1,80 @@ +- 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=**/*nose_results.html + - --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=**/*testr_results.html.gz + - --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=/.testrepository/tmp* + - --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=**/*testrepository.subunit.gz + - --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 }}/tox' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/.tox/*/log/* + - --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=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/group-based-policy-dsvm-nfp/run.yaml b/playbooks/legacy/group-based-policy-dsvm-nfp/run.yaml new file mode 100644 index 000000000..5fb8e46ee --- /dev/null +++ b/playbooks/legacy/group-based-policy-dsvm-nfp/run.yaml @@ -0,0 +1,59 @@ +- hosts: all + name: Autoconverted job legacy-group-based-policy-dsvm-nfp from old job gate-group-based-policy-dsvm-nfp-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/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 DEVSTACK_GATE_UNSTACK=1 + export DEVSTACK_GATE_TEMPEST=0 + export DEVSTACK_GATE_EXERCISES=0 + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_GATE_INSTALL_TESTONLY=1 + export PROJECTS="x/group-based-policy $PROJECTS" + export PROJECTS="x/group-based-policy-automation $PROJECTS" + export PROJECTS="x/group-based-policy-ui $PROJECTS" + export PROJECTS="x/python-group-based-policy-client $PROJECTS" + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + function gate_hook { + bash -xe $BASE/new/group-based-policy/gbpservice/tests/contrib/gate_nfp_hook.sh dsvm-nfp + } + export -f gate_hook + + function post_test_hook { + bash -xe $BASE/new/group-based-policy/gbpservice/tests/contrib/post_test_nfp_hook.sh dsvm-nfp + } + 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 }}'