Updates for zuulv3 jobs
Since migrating from zuulv2.5 our jobs were still legacy. This updates the required bits again to get our jobs properly passing again. Change-Id: Iba333fd2d8dc996e7eea63494478640d133c9da6 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
1d1636db02
commit
2959772d57
39
.zuul.yaml
Normal file
39
.zuul.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
- job:
|
||||||
|
name: ansible-role-ssh
|
||||||
|
run: tests/playbooks/run.yaml
|
||||||
|
roles:
|
||||||
|
- zuul: openstack/ansible-role-ssh
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-role-ssh-fedora-27
|
||||||
|
parent: ansible-role-ssh
|
||||||
|
nodeset: fedora-27
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-role-ssh-ubuntu-bionic
|
||||||
|
parent: ansible-role-ssh
|
||||||
|
nodeset: ubuntu-bionic
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-role-ssh-ubuntu-xenial
|
||||||
|
parent: ansible-role-ssh
|
||||||
|
nodeset: ubuntu-xenial
|
||||||
|
|
||||||
|
- project:
|
||||||
|
name: openstack/ansible-role-ssh
|
||||||
|
templates:
|
||||||
|
- windmill-jobs-fedora-27
|
||||||
|
- windmill-jobs-bionic
|
||||||
|
- windmill-jobs-xenial
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- ansible-role-ssh-fedora-27
|
||||||
|
- ansible-role-ssh-ubuntu-bionic
|
||||||
|
- ansible-role-ssh-ubuntu-xenial
|
||||||
|
- tox-linters
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- ansible-role-ssh-fedora-27
|
||||||
|
- ansible-role-ssh-ubuntu-bionic
|
||||||
|
- ansible-role-ssh-ubuntu-xenial
|
||||||
|
- tox-linters
|
@ -20,11 +20,15 @@ galaxy_info:
|
|||||||
unsecured network.
|
unsecured network.
|
||||||
company: Red Hat, Inc.
|
company: Red Hat, Inc.
|
||||||
license: Apache
|
license: Apache
|
||||||
min_ansible_version: 2.0
|
min_ansible_version: 2.4
|
||||||
platforms:
|
platforms:
|
||||||
- name: EL
|
- name: Fedora
|
||||||
versions:
|
versions:
|
||||||
- 7
|
- 27
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- 16.04
|
||||||
|
- 18.04
|
||||||
categories:
|
categories:
|
||||||
- cloud
|
- system
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
@ -1 +1 @@
|
|||||||
ansible>=2.0.0
|
ansible>=2.4.0
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
[defaults]
|
|
||||||
roles_path = ../..
|
|
@ -1,2 +1 @@
|
|||||||
[test]
|
localhost
|
||||||
test01 ansible_host=127.0.0.2
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2015 Red Hat, Inc.
|
# Copyright 2018 Red Hat, Inc.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -12,20 +12,11 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
- hosts: test
|
- hosts: all
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}"
|
rolename: ansible-role-ssh
|
||||||
ssh_user_name: "{{ ansible_user }}"
|
ssh_user_name: "{{ ansible_user }}"
|
||||||
ssh_user_home: /tmp/.ssh
|
ssh_user_home: /tmp/.ssh
|
||||||
|
|
||||||
pre_tasks:
|
|
||||||
# Make sure OS does not have a stale package cache.
|
|
||||||
- name: Update apt cache.
|
|
||||||
become: yes
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
when: ansible_os_family == 'Debian'
|
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- "{{ rolename }}"
|
- "{{ rolename }}"
|
37
tox.ini
37
tox.ini
@ -10,29 +10,6 @@ deps = -r{toxinidir}/requirements.txt
|
|||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
|
||||||
[testenv:functional]
|
|
||||||
commands =
|
|
||||||
ansible-playbook -i tests/inventory tests/test.yaml -e ansible_user={env:USER}
|
|
||||||
passenv = HOME
|
|
||||||
setenv =
|
|
||||||
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
|
||||||
PYTHONUNBUFFERED = 1
|
|
||||||
|
|
||||||
[testenv:linters]
|
|
||||||
setenv =
|
|
||||||
ANSIBLE_CONFIG = tests/ansible.cfg
|
|
||||||
whitelist_externals = bash
|
|
||||||
commands =
|
|
||||||
# PEP8 Lint Check
|
|
||||||
flake8
|
|
||||||
# Ansible Lint Check
|
|
||||||
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
|
||||||
ansible-lint"
|
|
||||||
# Ansible Syntax Check
|
|
||||||
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
|
|
||||||
ansible-playbook --syntax-check -i tests/inventory \
|
|
||||||
-e rolename=$(basename $(pwd)) > /dev/null"
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
@ -44,3 +21,17 @@ ignore = E123,E125
|
|||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
setenv =
|
||||||
|
ANSIBLE_ROLES_PATH = ..
|
||||||
|
whitelist_externals = bash
|
||||||
|
commands =
|
||||||
|
# PEP8 Lint Check
|
||||||
|
flake8
|
||||||
|
# Ansible Lint Check
|
||||||
|
bash -c "find . -not -path '*/\.*' -type f -regex '.*.y[a]?ml' -print0 | \
|
||||||
|
xargs -t -n1 -0 ansible-lint"
|
||||||
|
# Ansible Syntax Check
|
||||||
|
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
|
||||||
|
ansible-playbook --syntax-check -i tests/inventory \
|
||||||
|
-e rolename=$(basename $(pwd)) > /dev/null"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user