openstack-helm-infra/playbooks/lint.yml
Gage Hugo 16676b5b63 Remove duplicate lint job entry and script
osh-infra currently has a duplicate linter playbook that is not
being used, since the other is used for both osh and osh-infra.
This change removes the duplicate entry and playbook.

Change-Id: If7040243a45f2166973dc5f0c8cd793431916942
2020-06-22 12:31:25 -05:00

49 lines
1.6 KiB
YAML

---
# Copyright 2018 SUSE LINUX GmbH.
#
# 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.
- hosts: all[0]
tasks:
- name: Prevent trailing whitespaces
shell: find . \! \( -path "*/\.*" -o -path "*/doc/build/*" -o -name "*.tgz" -o -name "*.png" \) -type f -exec egrep -l " +$" {} \;
register: _found_whitespaces
failed_when: _found_whitespaces.stdout != ""
args:
chdir: "{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}"
- name: Check if yamllint.conf exists
stat:
path: "{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}/yamllint.conf"
register: yamllintconf
- name: Install jq and pip
apt:
pkg:
- jq
- python3-pip
become: yes
when: yamllintconf.stat.exists == True
- name: Install tox
shell: pip3 install -U tox
become: yes
when: yamllintconf.stat.exists == True
- name: Execute yamllint check for values* yaml files
command: tox -e lint
args:
chdir: "{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}"
when: yamllintconf.stat.exists == True
...