project-config/jenkins/jobs/ara.yaml

73 lines
2.4 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`
function cleanup {
rm -f $CLONEMAP
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: openstack/openstack-ansible-tests
dest: openstack-ansible-tests
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP \
--cache-dir /opt/git \
git://git.openstack.org openstack/openstack-ansible-tests
# 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.
- job-template:
name: 'gate-ara-integration-openstack-ansible-func-{ostype}{suffix}'
node: '{ostype}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints
- install-distro-packages
- openstack-ansible-tests-checkout
- 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: |
cd openstack-ansible-tests
/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