From ea53eea02319f12904a84fa379f088cab68608d1 Mon Sep 17 00:00:00 2001 From: Saad Zaher Date: Mon, 4 Dec 2017 23:13:44 +0000 Subject: [PATCH] Move legacy freezer-web-ui jobs to project Change-Id: I30df649bd91467caedab31ee01a86c5b164f127f --- .zuul.yaml | 20 +++++ .../freezer-web-ui-ubuntu-xenial/post.yaml | 80 +++++++++++++++++++ .../freezer-web-ui-ubuntu-xenial/run.yaml | 67 ++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 .zuul.yaml create mode 100644 playbooks/legacy/freezer-web-ui-ubuntu-xenial/post.yaml create mode 100644 playbooks/legacy/freezer-web-ui-ubuntu-xenial/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..40d310a --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,20 @@ +- project: + name: openstack/freezer-web-ui + check: + jobs: + - freezer-web-ui-ubuntu-xenial: + voting: false + +- job: + name: freezer-web-ui-ubuntu-xenial + parent: legacy-dsvm-base + run: playbooks/legacy/freezer-web-ui-ubuntu-xenial/run.yaml + post-run: playbooks/legacy/freezer-web-ui-ubuntu-xenial/post.yaml + timeout: 7800 + required-projects: + - openstack-infra/devstack-gate + - openstack/freezer + - openstack/freezer-api + - openstack/freezer-web-ui + - openstack/python-freezerclient + diff --git a/playbooks/legacy/freezer-web-ui-ubuntu-xenial/post.yaml b/playbooks/legacy/freezer-web-ui-ubuntu-xenial/post.yaml new file mode 100644 index 0000000..dac8753 --- /dev/null +++ b/playbooks/legacy/freezer-web-ui-ubuntu-xenial/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/freezer-web-ui-ubuntu-xenial/run.yaml b/playbooks/legacy/freezer-web-ui-ubuntu-xenial/run.yaml new file mode 100644 index 0000000..13a9b5c --- /dev/null +++ b/playbooks/legacy/freezer-web-ui-ubuntu-xenial/run.yaml @@ -0,0 +1,67 @@ +- hosts: all + name: Autoconverted job legacy-osbackup-freezer-web-ui-dsvm from old job gate-osbackup-freezer-web-ui-dsvm-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]] + # enable freezer-agent and freezer-scheduler + enable_plugin freezer git://git.openstack.org/openstack/freezer + # enable freezer-api and python-freezerclient + enable_plugin freezer-api https://git.openstack.org/openstack/freezer-api + # enable freezer-web-ui and python-freezerclient + enable_plugin freezer-web-ui https://git.openstack.org/openstack/freezer-web-ui + + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + # checkout freezer components + export PROJECTS="openstack/freezer-api $PROJECTS" + export PROJECTS="openstack/freezer-web-ui $PROJECTS" + export PROJECTS="openstack/freezer $PROJECTS" + export PROJECTS="openstack/python-freezerclient $PROJECTS" + # tempest config + export DEVSTACK_GATE_TEMPEST=0 + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=0 + TEMPEST_REGEX="freezer_api_tempest_plugin" + export DEVSTACK_GATE_TEMPEST_REGEX=freezer_api_tempest_plugin + # which repo is being tested + export DEVSTACK_PROJECT_FROM_GIT=freezer-api + export "OVERRIDE_FREEZER_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 }}'