project-config/jenkins/jobs/ara.yaml
David Moreau-Simard b376543dd4 Make the OpenStack-Ansible integration jobs voting in the ARA gate
The OpenStack-Ansible integration jobs are a great and reliable way
to test ARA on real playbooks from real users and since it
continually tests their workflows, ARA is not as likely to merge
regressions which could break their gate or any other gate using ARA.

Change-Id: I382442880f7368b7c4d00c0e5bdd736d43cd7aa7
2017-05-08 21:37:36 -04:00

90 lines
3.1 KiB
YAML

- job-template:
name: 'gate-ara-integration-{ansible_version}-{ostype}'
node: '{ostype}'
builders:
- print-template-name:
template-name: "{template-name}"
- link-logs
- zuul-git-prep
- install-distro-packages
- shell: |
#!/bin/bash -xe
./run_tests.sh ansible=={ansible_version}
wrappers:
- build-timeout:
timeout: 20
- timestamps
publishers:
- devstack-logs
- console-log
- builder:
name: openstack-ansible-tests-checkout
builders:
- shell: |
#!/bin/bash -xe
CLONEMAP=`mktemp`
REQS_DIR=`mktemp -d`
function cleanup {
rm -f $CLONEMAP
rm -rf $REQS_DIR
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: openstack/openstack-ansible-tests
dest: .
- name: openstack/requirements
dest: $REQS_DIR
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP \
--cache-dir /opt/git git://git.openstack.org \
openstack/openstack-ansible-tests \
openstack/requirements
cp $REQS_DIR/upper-constraints.txt ./
# This is a re-implementation of the OSA func jobs, ex:
# https://github.com/openstack-infra/project-config/blob/45d26f75d150febc121b91ebd5aa0435ecba7315/jenkins/jobs/ansible-role-jobs.yaml#L66
# In the original job, it would be expected that ARA would have a "functional"
# tox env that would then retrieve openstack-ansible-tests and run from there.
# In this job, we zuul-clone openstack-ansible-tests directly and run the
# functional tox env from it.
# openstack-ansible-tests will install ARA by itself - if running from the ARA
# gate ($ZUUL_PROJECT == 'openstack/ara'), it retrieves ARA from zuul-cloner,
# otherwise, PyPi.
- job-template:
name: 'gate-ara-integration-openstack-ansible-func-{ostype}'
node: '{ostype}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- openstack-ansible-tests-checkout
- shell: |
# EPEL must be enabled because some deps from bindep.txt are
# otherwise not available
if [[ -e /usr/bin/yum ]]; then
sudo yum-config-manager --enable epel
fi
- install-distro-packages
- shell: |
if [[ -e /usr/bin/yum ]]; then
sudo yum-config-manager --disable epel
fi
- shell: |
# Allow Jenkins user to ssh into localhost
ssh-keygen -f ~/.ssh/id_rsa -N ""
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh-keyscan localhost >> ~/.ssh/known_hosts
ssh-keyscan 127.0.0.1 >> ~/.ssh/known_hosts
- shell: |
/usr/local/jenkins/slave_scripts/run-tox.sh functional
publishers:
# Although these aren't devstack jobs, we want to capture logs
# similar in nature to devstack (Ansible logs, system logs, etc.)
- devstack-logs
- console-log