Fix ansible-role-functional jobs

Create new jobs ansible-role-functional-* for ansible-role testing, we
need ssh to localhost enabled and sudo access. Otherwise, it's running
tox -e functional.

Update project-templates, remove extra ansible-role-functional platform
jobs that are not needed anymore.

This was tested in https://review.openstack.org/540779

Change-Id: I9c070893b24fffd1f528debfeb4b36e6a5ab8ca4
This commit is contained in:
Andreas Jaeger 2018-02-05 10:14:31 +01:00
parent cb9b1f136a
commit 78329e7b4a
3 changed files with 46 additions and 29 deletions

View File

@ -0,0 +1,13 @@
- hosts: all
name: Set up SSH login
tasks:
- name: Allow ssh login into localhost
shell:
cmd: |
# Allow 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
chdir: '{{ zuul.project.src_dir }}'

View File

@ -397,28 +397,6 @@
vars:
tox_envlist: functional
- job:
name: openstack-tox-functional-centos-7
parent: openstack-tox-functional
description: |
Run tox-based functional tests for an OpenStack Python project.
Uses tox with the ``functional`` environment.
Runs on CentOS 7 node.
nodeset: centos-7
- job:
name: openstack-tox-functional-fedora-26
parent: openstack-tox-functional
description: |
Run tox-based functional tests for an OpenStack Python project.
Uses tox with the ``functional`` environment.
Runs on a Fedora 26 node.
nodeset: fedora-26
- job:
name: openstack-tox-functional-py35
parent: openstack-tox
@ -1032,3 +1010,29 @@
tox_envlist: linters
tox_environment:
ANSIBLE_ROLES_PATH: ~/src/git.openstack.org/openstack-infra/zuul-jobs/roles:~/src/git.openstack.org/openstack-infra/openstack-zuul-jobs/roles:~/src/git.openstack.org/openstack-infra/project-config/roles
- job:
name: ansible-role-functional-base
parent: tox
description: |
Run functional functional tests for ansible-role projects.
Uses tox with the ``functional`` environment.
pre-run: playbooks/ansible-role-functional/pre.yaml
run: playbooks/tox-with-sudo/run.yaml
vars:
tox_envlist: functional
- job:
name: ansible-role-functional-centos-7
parent: ansible-role-functional-base
nodeset: centos-7
- job:
name: ansible-role-functional-fedora-26
parent: ansible-role-functional-base
nodeset: fedora-26
- job:
name: ansible-role-functional-ubuntu-xenial
parent: ansible-role-functional-base

View File

@ -965,10 +965,10 @@
CentOS 7 nodes.
check:
jobs:
- openstack-tox-functional-centos-7
- ansible-role-functional-centos-7
gate:
jobs:
- openstack-tox-functional-centos-7
- ansible-role-functional-centos-7
- project-template:
name: ansible-role-functional-jobs-fedora-26
@ -977,10 +977,10 @@
Fedora 26 nodes.
check:
jobs:
- openstack-tox-functional-fedora-26
- ansible-role-functional-fedora-26
gate:
jobs:
- openstack-tox-functional-fedora-26
- ansible-role-functional-fedora-26
- project-template:
name: ansible-role-functional-jobs-xenial
@ -989,10 +989,10 @@
Ubuntu Xenial nodes.
check:
jobs:
- openstack-tox-functional
- ansible-role-functional-ubuntu-xenial
gate:
jobs:
- openstack-tox-functional
- ansible-role-functional-ubuntu-xenial
- project-template:
name: ansible-role-functional-jobs-xenial-nv
@ -1001,5 +1001,5 @@
Ubuntu Xenial nodes. The tests are non-voting.
check:
jobs:
- openstack-tox-functional:
- ansible-role-functional-ubuntu-xenial:
voting: false