Initial commit with empty lint job
Change-Id: I7d81ad1faca6ce896b4d2caedcea15b1abd035ef
This commit is contained in:
parent
917c848e62
commit
05b05b0c3e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.retry
|
33
tests/ansible/lint.yaml
Normal file
33
tests/ansible/lint.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
- hosts: primary
|
||||
tasks:
|
||||
- block:
|
||||
- name: Ensuring ansible-lint package is present
|
||||
fail:
|
||||
msg: "Centos or RHEL is not yet supported"
|
||||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
||||
|
||||
- name: Ensuring ansible-lint package is present
|
||||
become: true
|
||||
apt:
|
||||
name: ansible-lint
|
||||
state: present
|
||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||
|
||||
|
||||
- name: find files to lint
|
||||
find:
|
||||
paths:
|
||||
- "{{ src_dir| default('../..') }}/playbooks"
|
||||
- "{{ src_dir| default('../..') }}/roles"
|
||||
patterns:
|
||||
- "*.yaml"
|
||||
- "*.yml"
|
||||
register: files_to_lint
|
||||
|
||||
# TODO (kkalynovskyi) develop suitable ansible-lint configuration
|
||||
- name: run ansible-lint against found files
|
||||
command: "ansible-lint {{ item.path }}"
|
||||
with_items: "{{ files_to_lint.files }}"
|
||||
|
||||
|
16
zuul.d/jobs.yaml
Normal file
16
zuul.d/jobs.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- job:
|
||||
name: ansible-lint-airship
|
||||
run: tests/ansible/lint.yaml
|
||||
nodeset: ubuntu-single-airship
|
17
zuul.d/nodesets.yaml
Normal file
17
zuul.d/nodesets.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- nodeset:
|
||||
name: ubuntu-single-airship
|
||||
nodes:
|
||||
- name: primary
|
||||
label: ubuntu-bionic
|
7
zuul.d/project.yaml
Normal file
7
zuul.d/project.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- ansible-lint-airship
|
||||
gate:
|
||||
jobs:
|
||||
- ansible-lint-airship
|
Loading…
Reference in New Issue
Block a user