Olivier Bourdon 99e97c4cc7 Add voting and gating test with Keystone enabled
Without this test, the Ironic services might end up
misconfigured and machines can not be provisioned
properly. The Ironic configuration templates
that Bifrost uses should be validated for both
Keystone enabled and disabled.

Change-Id: Iab4457a6dcea232b5c19e681dc87b08570c2a120
Depends-On: I4c733dba8e65fe624c9de5b9c5722cef2df59109
2018-10-11 18:14:05 +02:00

83 lines
2.7 KiB
YAML

- hosts: all
name: Autoconverted job legacy-bifrost-integration-tinyipa from old job gate-bifrost-integration-tinyipa-ubuntu-xenial
roles:
- role: bindep
bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/bifrost'].src_dir }}"
tasks:
- name: Set script name for testing without Keystone
set_fact:
script_name: scripts/test-bifrost.sh
when: not (use_keystone | default(false) | bool)
- name: Set script name for testing with Keystone
set_fact:
script_name: scripts/test-bifrost-keystone-auth.sh
when: use_keystone | default(false) | bool
- 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/openstacksdk \
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
"{{ script_name }}"
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'