From 873527d74613d100afcffea6c4d53eb9139f7399 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Wed, 22 Jul 2020 22:55:07 -0700 Subject: [PATCH] Native Zuulv3 scenario test job Replace the "manila-tempest-dsvm-generic-scenario-custom-image" job with a native Zuulv3 style job that does not use the deprecated devstack-gate project. This new test job runs integration NFS and CIFS tests against a newly created test image that is used as the service instance image, as well as the client image. Change-Id: I3d2345e80f3bc18558d4cc6cc58108ff63119460 Signed-off-by: Goutham Pacha Ravi --- .gitignore | 1 + .../run-generic-scenario.yaml | 7 +++ roles/build-mie-images/README.rst | 7 ++- roles/build-mie-images/defaults/main.yml | 1 + roles/build-mie-images/tasks/main.yml | 12 ++--- tools/run_bashate.sh | 1 + .../manila-image-elements-jobs.yaml | 47 +++++++------------ zuul.d/project.yaml | 28 +++++++++++ 8 files changed, 67 insertions(+), 37 deletions(-) create mode 100644 playbooks/manila-buildimages/run-generic-scenario.yaml rename .zuul.yaml => zuul.d/manila-image-elements-jobs.yaml (51%) create mode 100644 zuul.d/project.yaml diff --git a/.gitignore b/.gitignore index d54aade..75a49eb 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ AUTHORS diskimage-create.* debug.sh /*.d +!zuul.d/ # Files created by Sphinx build build diff --git a/playbooks/manila-buildimages/run-generic-scenario.yaml b/playbooks/manila-buildimages/run-generic-scenario.yaml new file mode 100644 index 0000000..d7006d4 --- /dev/null +++ b/playbooks/manila-buildimages/run-generic-scenario.yaml @@ -0,0 +1,7 @@ +- hosts: all + roles: + - role: ensure-tox + ensure_global_symlinks: true + - role: build-mie-images + images_to_build: + - generic \ No newline at end of file diff --git a/roles/build-mie-images/README.rst b/roles/build-mie-images/README.rst index a42514d..73786da 100644 --- a/roles/build-mie-images/README.rst +++ b/roles/build-mie-images/README.rst @@ -6,9 +6,14 @@ An ansible role to build images with manila-image-elements Role Variables -------------- +.. zuul:rolevar:: mie_project_path + :type: string + :default: {{ zuul.projects['opendev.org/openstack/manila-image-elements'].src_dir }} + + Path of the manila-image-elements repository. + .. zuul:rolevar:: images_to_build :type: list :default: ['generic', 'cephfs'] - One or more image types to build. diff --git a/roles/build-mie-images/defaults/main.yml b/roles/build-mie-images/defaults/main.yml index 41647f2..042685f 100644 --- a/roles/build-mie-images/defaults/main.yml +++ b/roles/build-mie-images/defaults/main.yml @@ -1,4 +1,5 @@ --- +mie_project_path: "{{ zuul.projects['opendev.org/openstack/manila-image-elements'].src_dir }}" images_to_build: - cephfs - generic \ No newline at end of file diff --git a/roles/build-mie-images/tasks/main.yml b/roles/build-mie-images/tasks/main.yml index 70c756b..7a943d5 100644 --- a/roles/build-mie-images/tasks/main.yml +++ b/roles/build-mie-images/tasks/main.yml @@ -2,26 +2,26 @@ - name: build the requested images command: bash -xe tools/gate/build-images {{ item }} args: - chdir: "{{ zuul.project.src_dir }}" + chdir: "{{ mie_project_path }}" with_items: "{{ images_to_build }}" - name: create images directory file: - path: "{{ zuul.project.src_dir }}/images" + path: "{{ mie_project_path }}/images" state: directory mode: 0755 - name: collect git tag command: git describe --tags args: - chdir: "{{ zuul.project.src_dir }}" + chdir: "{{ mie_project_path }}" register: tagoutput - name: show directory contents after the build command: ls -lrt args: - chdir: "{{ zuul.project.src_dir }}" + chdir: "{{ mie_project_path }}" - name: get the source directory command: pwd args: - chdir: '{{ zuul.project.src_dir }}' + chdir: '{{ mie_project_path }}' register: src_dir - name: grab all images built find: @@ -50,4 +50,4 @@ - name: get contents of the images directory command: ls -lrt args: - chdir: "{{ zuul.project.src_dir }}/images/" + chdir: "{{ mie_project_path }}/images/" diff --git a/tools/run_bashate.sh b/tools/run_bashate.sh index d243b54..702cc5a 100755 --- a/tools/run_bashate.sh +++ b/tools/run_bashate.sh @@ -4,4 +4,5 @@ find ./ -not -wholename \*.tox/\* -and \ \( -name \*.sh -or -wholename \*.d/\* -and \ -not -name \*.md -and -not -name \*.rst -and \ -not -name \*.py -and -not -name \*.conf \) \ + -not -name \*.yaml \ -print0 | xargs -0 bashate -v -i E006 diff --git a/.zuul.yaml b/zuul.d/manila-image-elements-jobs.yaml similarity index 51% rename from .zuul.yaml rename to zuul.d/manila-image-elements-jobs.yaml index 9e3e33f..7cab41a 100644 --- a/.zuul.yaml +++ b/zuul.d/manila-image-elements-jobs.yaml @@ -1,32 +1,3 @@ -- project: - templates: - - check-requirements - - build-openstack-docs-pti - - openstack-lower-constraints-jobs - check: - jobs: - - openstack-tox-pep8 - - manila-image-elements-buildimages - - manila-image-elements-buildimage-docker: - voting: false - - manila-tempest-dsvm-container-scenario-custom-image: - voting: false - irrelevant-files: - - ^(test-|)requirements.txt$ - - ^setup.cfg$ - - manila-tempest-dsvm-generic-scenario-custom-image: - voting: false - irrelevant-files: - - ^(test-|)requirements.txt$ - - ^setup.cfg$ - gate: - jobs: - - openstack-tox-pep8 - - manila-image-elements-buildimages - post: - jobs: - - manila-image-elements-publish-artifacts - - job: name: manila-image-elements-buildimage-docker description: | @@ -51,7 +22,7 @@ - job: name: manila-image-elements-publish-artifacts description: | - Build image artifacts and publish to tarballs.openstack.org + Build image artifacts and publish to tarba.lls.openstack.org. parent: publish-openstack-artifacts timeout: 3600 final: true @@ -59,3 +30,19 @@ - openstack/manila-image-elements run: playbooks/manila-buildimages/run.yaml post-run: playbooks/manila-publish-artifacts/post.yaml + +- job: + name: manila-image-elements-generic-scenario + parent: manila-tempest-plugin-generic + pre-run: playbooks/manila-buildimages/run-generic-scenario.yaml + required-projects: + - openstack/manila-image-elements + - openstack/manila + - openstack/manila-tempest-plugin + - openstack/python-manilaclient + - openstack/tempest + vars: + tempest_test_regex: '^manila_tempest_tests.tests.scenario(?=.*\btest_write_data_to_share_created_from_snapshot\b.*)' + devstack_localrc: + MANILA_SERVICE_IMAGE_URL: "file:///home/zuul/src/opendev.org/openstack/manila-image-elements/manila-service-image.qcow2" + MANILA_SERVICE_IMAGE_NAME: manila-service-image diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml new file mode 100644 index 0000000..e2f9299 --- /dev/null +++ b/zuul.d/project.yaml @@ -0,0 +1,28 @@ +- project: + templates: + - check-requirements + - build-openstack-docs-pti + - openstack-lower-constraints-jobs + check: + jobs: + - openstack-tox-pep8 + - manila-image-elements-buildimages + - manila-image-elements-buildimage-docker + - manila-tempest-dsvm-container-scenario-custom-image: + voting: false + irrelevant-files: &irrelevant-files + - ^(test-|)requirements.txt$ + - ^setup.cfg$ + - ^.*\.rst$ + - ^doc/.*$ + - ^tox.ini$ + - manila-image-elements-generic-scenario: + voting: false + irrelevant-files: *irrelevant-files + gate: + jobs: + - openstack-tox-pep8 + - manila-image-elements-buildimages + post: + jobs: + - manila-image-elements-publish-artifacts