#146 CI: Run yamllint on added or modified YAML files
Merged 3 years ago by nphilipp. Opened 3 years ago by nphilipp.
fedora-infra/ nphilipp/ansible master--ci-yamllint  into  master

file added
+14
@@ -0,0 +1,14 @@ 

+ ---

+ extends: default

+ 

+ rules:

+   indentation:

+     spaces: 2

+     indent-sequences: whatever

+     level: warning

+   line-length:

+     max: 100

+     level: warning

+   truthy:

+     allowed-values: ['true', 'false', 'yes', 'no']

+ ...

file modified
+8
@@ -19,8 +19,16 @@ 

      parent: fi-ansible--ansible-review-base

      run: ci/ansible-review-diff.yaml

  

+ - job:

+     name: fi-ansible--yamllint-diff

+     run: ci/yamllint-diff.yaml

+     files:

+       - \.yml$

+       - \.yaml$

+ 

  - project:

      check:

        jobs:

          - fi-ansible--zuul-jobs-verify-namespace

          - fi-ansible--ansible-review-diff

+         - fi-ansible--yamllint-diff

@@ -0,0 +1,24 @@ 

+ ---

+ - hosts: all

+   tasks:

+     - name: Install yamllint

+       package:

+         name: yamllint

+         state: latest

+ 

+     - name: Determine added or modified YAML files

+       command:

+         cmd: >

+           git diff --name-only --diff-filter=AM

+           origin/{{ zuul.branch|quote }}...{{ zuul.branch|quote }}

+       args:

+         chdir: '{{ zuul.project.src_dir }}'

+       register: fi_ansible__added_modified_yaml_files

+       changed_when: "False"

+       failed_when: fi_ansible__added_modified_yaml_files.rc != 0

+ 

+     - name: Run yamllint on changed YAML files

+       command: yamllint {{ item }}

+       args:

+         chdir: '{{ zuul.project.src_dir }}'

+       with_items: "{{ fi_ansible__added_modified_yaml_files.stdout_lines | list }}"

rebased onto 7f3d3bc0eda44eb1b12ee403deb9dc9e022fb980

3 years ago

rebased onto 4f2121a1b1c8c501befa3352efd27596ba510db4

3 years ago

rebased onto 854c025f7044bc3d2ef9fb4bdb18cdc0ab6f801b

3 years ago

rebased onto fce4c63e1d3a7556be14c0c343b5068f7dc62941

3 years ago

rebased onto e1946f176116e3e592fdb8d04d6243363f467b25

3 years ago

rebased onto 3663546da8a922092165ff92b5b21570640a0943

3 years ago

rebased onto 84584580ee2d77745f6f3ae669cf841349a8d3b0

3 years ago

rebased onto 84584580ee2d77745f6f3ae669cf841349a8d3b0

3 years ago

rebased onto 92a9dea2d293cf96e8b3c853238cfe5f9e16fe60

3 years ago

rebased onto 749de5c15d55a0d56af398450f02d288ea99e053

3 years ago

rebased onto 749de5c15d55a0d56af398450f02d288ea99e053

3 years ago

rebased onto 24deb16

3 years ago

rebased onto 24deb16

3 years ago

@zlopez missed your comment, merging

Pull-Request has been merged by nphilipp

3 years ago