project-config/jenkins/jobs/ara.yaml
David Moreau-Simard c6432068a1 Add non-voting jobs for ARA to test the devel branch of Ansible
The Ansible devel branch is working towards the release of Ansible
2.4 and have begun introducing backwards-incompatible changes that
break ARA, such as this one [1].

By having a non-voting job against devel, we are able to see these
changes coming as they land as well as work to resolve the issues
on a continuous basis so that when 2.4 releases, ARA is ready.

[1]: 74842adc07

Change-Id: Ib123ba0715cb4e7625b3080ac36fb92eaffe7d43
2017-06-20 12:43:33 -04:00

90 lines
3.1 KiB
YAML

- job-template:
name: 'gate-ara-integration-{ansible_version}-{ostype}{suffix}'
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