- job-template: name: 'gate-ara-integration-{python_version}-{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 --python {python_version} --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}{suffix}' node: '{ostype}' wrappers: - build-timeout: timeout: 60 - timestamps builders: - print-template-name: template-name: "{template-name}" - openstack-ansible-tests-checkout - shell: | # NOTE(mhayden): The CentOS CI image has many repositories enabled by # default that can cause package conflicts. We must disable all of # them here and only enable base, updates, and epel. if [[ -e /usr/bin/yum ]] && [[ -x /usr/bin/yum-config-manager ]]; then sudo yum-config-manager --disable \* sudo yum-config-manager --enable base sudo yum-config-manager --enable epel sudo yum-config-manager --enable updates fi - install-distro-packages - shell: | # NOTE(mhayden): EPEL is no longer required after installing distro # packages with bindep. Individual roles may re-enable EPEL if they # need it for their package installation tasks. if [[ -e /usr/bin/yum ]] && [[ -x /usr/bin/yum-config-manager ]]; 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