From 1c16a41181aa7c77cbe6c59700d10a2e0270444d Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Mon, 17 Aug 2020 09:56:22 -0700 Subject: [PATCH] Drop legacy-base from manila-test-image-build We don't need the legacy and deprecated zuul-cloner approach if we rewrite the job in native zuulv3 style. Change-Id: Ifc6d592b8b7cf0e802ee11be837ebd4a3b55ea9b Signed-off-by: Goutham Pacha Ravi --- .zuul.yaml | 6 ++- playbooks/manila-test-image-build/run.yaml | 51 ++-------------------- 2 files changed, 8 insertions(+), 49 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 13764ce..549242e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,8 +1,10 @@ - job: name: manila-test-image-build - parent: legacy-base + parent: unittests + required-projects: + - openstack/manila-test-image run: playbooks/manila-test-image-build/run.yaml - timeout: 3600 + timeout: 1800 - project: check: diff --git a/playbooks/manila-test-image-build/run.yaml b/playbooks/manila-test-image-build/run.yaml index 722cd8d..ff45009 100644 --- a/playbooks/manila-test-image-build/run.yaml +++ b/playbooks/manila-test-image-build/run.yaml @@ -1,49 +1,6 @@ - hosts: all - name: Autoconverted job legacy-manila-test-image-build from old job gate-manila-test-image-build - roles: - - bindep - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -e - set -x - CLONEMAP=`mktemp` - function cleanup { - # In cases where zuul-cloner is aborted during a git - # clone operation, git will remove the git work tree in - # its cleanup. The work tree in these jobs is the - # workspace directory, which means that subsequent - # jenkins post-build actions can not run because the - # workspace has been removed. - # To reduce the likelihood of this having an impact, - # recreate the workspace directory if needed - mkdir -p $WORKSPACE - rm -f $CLONEMAP - } - trap cleanup EXIT - cat > $CLONEMAP << EOF - clonemap: - - name: $ZUUL_PROJECT - dest: . - EOF - /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ - https://opendev.org $ZUUL_PROJECT - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - ./run-buildroot.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' + - name: Build manila-test-image + command: bash -xe ./run-buildroot.sh + args: + chdir: '{{ zuul.project.src_dir }}'