Refactor bifrost-integration-tinyipa jobs

This removes duplicate code and legacy nodesets.

Change-Id: I9b1fcb1f10c378d467a1af055fc88a7dac134221
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-08-16 09:54:38 -04:00
parent 9e07378e67
commit ebe8cfa1d9
7 changed files with 12 additions and 187 deletions

View File

@ -1,15 +0,0 @@
- 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=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,72 +0,0 @@
- hosts: all
name: Autoconverted job legacy-bifrost-integration-tinyipa-centos-7 from old job
gate-bifrost-integration-tinyipa-centos-7
roles:
- role: bindep
bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/bifrost'].src_dir }}"
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
CLONEMAP=`mktemp`
REQS_DIR=`mktemp -d`
function cleanup {
mkdir -p $WORKSPACE
rm -rf $CLONEMAP $REQS_DIR
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: $ZUUL_PROJECT
dest: .
EOF
# zuul cloner works poorly if there are 2 names that are the
# same in here.
if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then
cat >> $CLONEMAP << EOF
- name: openstack/requirements
dest: $REQS_DIR
EOF
fi
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
git://git.openstack.org $ZUUL_PROJECT openstack/requirements
# REQS_DIR is not set for openstack/requirements and there is also
# no need to copy in this case.
if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then
cp $REQS_DIR/upper-constraints.txt ./
fi
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -u
set -e
set -x
cd $WORKSPACE
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
git://git.openstack.org \
openstack/bifrost \
openstack/ironic \
openstack/python-ironicclient \
openstack-infra/shade \
openstack/ironic-inspector \
openstack/python-ironic-inspector-client \
openstack/requirements
export GIT_BASE=$(pwd)
export UPPER_CONSTRAINTS_FILE=$WORKSPACE/upper-constraints.txt
cd openstack/bifrost
scripts/test-bifrost.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -1,15 +0,0 @@
- 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=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,72 +0,0 @@
- hosts: all
name: Autoconverted job legacy-bifrost-integration-tinyipa-opensuse-423 from old
job gate-bifrost-integration-tinyipa-opensuse-423
roles:
- role: bindep
bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/bifrost'].src_dir }}"
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
CLONEMAP=`mktemp`
REQS_DIR=`mktemp -d`
function cleanup {
mkdir -p $WORKSPACE
rm -rf $CLONEMAP $REQS_DIR
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: openstack/bifrost
dest: .
EOF
# zuul cloner works poorly if there are 2 names that are the
# same in here.
if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then
cat >> $CLONEMAP << EOF
- name: openstack/requirements
dest: $REQS_DIR
EOF
fi
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
git://git.openstack.org openstack/bifrost openstack/requirements
# REQS_DIR is not set for openstack/requirements and there is also
# no need to copy in this case.
if [[ "$ZUUL_PROJECT" != "openstack/requirements" ]]; then
cp $REQS_DIR/upper-constraints.txt ./
fi
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -u
set -e
set -x
cd $WORKSPACE
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
git://git.openstack.org \
openstack/bifrost \
openstack/ironic \
openstack/python-ironicclient \
openstack-infra/shade \
openstack/ironic-inspector \
openstack/python-ironic-inspector-client \
openstack/requirements
export GIT_BASE=$(pwd)
export UPPER_CONSTRAINTS_FILE=$WORKSPACE/upper-constraints.txt
cd openstack/bifrost
scripts/test-bifrost.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -1,4 +1,4 @@
- hosts: primary
- hosts: all
tasks:
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node

View File

@ -78,18 +78,17 @@
post-run: playbooks/legacy/bifrost-integration-tinyipa/post.yaml
timeout: 3600
- job:
name: bifrost-integration-tinyipa-ubuntu-xenial
parent: bifrost-integration-tinyipa
nodeset: ubuntu-xenial
- job:
name: bifrost-integration-tinyipa-centos-7
parent: bifrost-base
run: playbooks/legacy/bifrost-integration-tinyipa-centos-7/run.yaml
post-run: playbooks/legacy/bifrost-integration-tinyipa-centos-7/post.yaml
timeout: 3600
nodeset: legacy-centos-7
parent: bifrost-integration-tinyipa
nodeset: centos-7
- job:
name: bifrost-integration-tinyipa-opensuse-423
parent: bifrost-base
run: playbooks/legacy/bifrost-integration-tinyipa-opensuse-423/run.yaml
post-run: playbooks/legacy/bifrost-integration-tinyipa-opensuse-423/post.yaml
timeout: 3600
nodeset: legacy-opensuse-423
parent: bifrost-integration-tinyipa
nodeset: opensuse-423

View File

@ -1,7 +1,7 @@
- project:
check:
jobs:
- bifrost-integration-tinyipa
- bifrost-integration-tinyipa-ubuntu-xenial
- bifrost-integration-tinyipa-opensuse-423
# Non-voting jobs
- bifrost-integration-dhcp-ubuntu-xenial:
@ -21,6 +21,6 @@
- openstack-tox-lower-constraints
gate:
jobs:
- bifrost-integration-tinyipa
- bifrost-integration-tinyipa-ubuntu-xenial
- bifrost-integration-tinyipa-opensuse-423
- openstack-tox-lower-constraints