Remove dulicate uses for zuul-cloner

No need to have this code duplicated in each job.

Change-Id: I5dae53962c0ab6ff1e4fa8c6d800abd12b293940
This commit is contained in:
Derek Higgins 2018-06-07 08:39:09 +01:00
parent fdd4340b82
commit a64e119d1f
19 changed files with 46 additions and 336 deletions

View File

@ -10,11 +10,6 @@
job gate-grenade-dsvm-ironic-multinode-multitenant-ubuntu-xenial job gate-grenade-dsvm-ironic-multinode-multitenant-ubuntu-xenial
tasks: tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
# NOTE(TheJulia): Python supports recompiling bytecode if a precompiled # NOTE(TheJulia): Python supports recompiling bytecode if a precompiled
# (.pyc) file is written to disk. Python will automatically recompile # (.pyc) file is written to disk. Python will automatically recompile
# should that file disappear and attempt to load and use that bytecode. # should that file disappear and attempt to load and use that bytecode.
@ -44,22 +39,6 @@
systemctl daemon-reexec systemctl daemon-reexec
become: yes become: yes
- 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-vars-early cat << 'EOF' >> ironic-vars-early

View File

@ -9,11 +9,6 @@
name: Autoconverted job legacy-grenade-dsvm-ironic from old job gate-grenade-dsvm-ironic-ubuntu-xenial-nv name: Autoconverted job legacy-grenade-dsvm-ironic from old job gate-grenade-dsvm-ironic-ubuntu-xenial-nv
tasks: tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- name: Show the environment - name: Show the environment
shell: shell:
cmd: | cmd: |
@ -22,22 +17,6 @@
chdir: '{{ ansible_user_dir }}/workspace' chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}' environment: '{{ zuul | zuul_legacy_vars }}'
- 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-vars-early cat << 'EOF' >> ironic-vars-early

View File

@ -0,0 +1,22 @@
- hosts: primary
name: Clone devstack-gate to /opt/git
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 }}'

View File

@ -0,0 +1,22 @@
- hosts: primary
name: Clone devstack-gate to /opt/git
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 }}'

View File

@ -2,27 +2,6 @@
name: Autoconverted job legacy-ironic-dsvm-functional from old job gate-ironic-dsvm-functional-ubuntu-xenial name: Autoconverted job legacy-ironic-dsvm-functional from old job gate-ironic-dsvm-functional-ubuntu-xenial
tasks: 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: - shell:
cmd: | cmd: |
set -e set -e

View File

@ -2,27 +2,6 @@
name: Autoconverted job legacy-ironic-dsvm-standalone from old job gate-ironic-dsvm-standalone-ubuntu-xenial name: Autoconverted job legacy-ironic-dsvm-standalone from old job gate-ironic-dsvm-standalone-ubuntu-xenial
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-vars-early cat << 'EOF' >> ironic-vars-early

View File

@ -2,27 +2,6 @@
name: Autoconverted job legacy-tempest-dsvm-ironic-bfv from old job gate-tempest-dsvm-ironic-bfv-ubuntu-xenial name: Autoconverted job legacy-tempest-dsvm-ironic-bfv from old job gate-tempest-dsvm-ironic-bfv-ubuntu-xenial
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -2,27 +2,6 @@
name: Legacy functional (API) tests job on Python 3 name: Legacy functional (API) tests job on Python 3
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -2,27 +2,6 @@
name: Autoconverted job legacy-tempest-dsvm-ironic-inspector from old job gate-tempest-dsvm-ironic-inspector-ubuntu-xenial-nv name: Autoconverted job legacy-tempest-dsvm-ironic-inspector from old job gate-tempest-dsvm-ironic-inspector-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -3,27 +3,6 @@
from old job gate-tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3-ubuntu-xenial-nv from old job gate-tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -3,27 +3,6 @@
from old job gate-tempest-dsvm-ironic-ipa-partition-redfish-tinyipa-ubuntu-xenial from old job gate-tempest-dsvm-ironic-ipa-partition-redfish-tinyipa-ubuntu-xenial
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -3,27 +3,6 @@
from old job gate-tempest-dsvm-ironic-ipa-partition-uefi-pxe_ipmitool-tinyipa-ubuntu-xenial from old job gate-tempest-dsvm-ironic-ipa-partition-uefi-pxe_ipmitool-tinyipa-ubuntu-xenial
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -3,27 +3,6 @@
from old job gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-multinode-ubuntu-xenial-nv from old job gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-multinode-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -3,27 +3,6 @@
from old job gate-tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-tinyipa-ubuntu-xenial-nv from old job gate-tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-tinyipa-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -3,27 +3,6 @@
from old job gate-tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_snmp-tinyipa-ubuntu-xenial-nv from old job gate-tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_snmp-tinyipa-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -2,27 +2,6 @@
name: Autoconverted job legacy-tempest-dsvm-ironic-parallel from old job gate-tempest-dsvm-ironic-parallel-ubuntu-xenial-nv name: Autoconverted job legacy-tempest-dsvm-ironic-parallel from old job gate-tempest-dsvm-ironic-parallel-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
set -e set -e

View File

@ -2,27 +2,6 @@
name: Autoconverted job legacy-tempest-dsvm-ironic-pxe_ipa-full from old job gate-tempest-dsvm-ironic-pxe_ipa-full-ubuntu-xenial-nv name: Autoconverted job legacy-tempest-dsvm-ironic-pxe_ipa-full from old job gate-tempest-dsvm-ironic-pxe_ipa-full-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -3,27 +3,6 @@
job gate-tempest-dsvm-ironic-pxe_ipmitool-postgres-ubuntu-xenial-nv job gate-tempest-dsvm-ironic-pxe_ipmitool-postgres-ubuntu-xenial-nv
tasks: 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: - shell:
cmd: | cmd: |
cat << 'EOF' >> ironic-extra-vars cat << 'EOF' >> ironic-extra-vars

View File

@ -23,6 +23,7 @@
- openstack/pyghmi - openstack/pyghmi
- openstack/python-ironicclient - openstack/python-ironicclient
- openstack/virtualbmc - openstack/virtualbmc
pre-run: playbooks/legacy/ironic-dsvm-base/pre.yaml
post-run: playbooks/legacy/ironic-dsvm-base/post.yaml post-run: playbooks/legacy/ironic-dsvm-base/post.yaml
- job: - job:
@ -51,6 +52,7 @@
- openstack/pyghmi - openstack/pyghmi
- openstack/python-ironicclient - openstack/python-ironicclient
- openstack/virtualbmc - openstack/virtualbmc
pre-run: playbooks/legacy/ironic-dsvm-base-multinode/pre.yaml
post-run: playbooks/legacy/ironic-dsvm-base-multinode/post.yaml post-run: playbooks/legacy/ironic-dsvm-base-multinode/post.yaml
- job: - job: