Zuul: Add basic validation script
See: https://pagure.io/fedora-comps/issue/785
This commit is contained in:
parent
852152c526
commit
f3d5b63793
|
@ -0,0 +1,9 @@
|
|||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- validate
|
||||
|
||||
- job:
|
||||
name: validate
|
||||
description: Validate comps files
|
||||
run: ci/validate.yaml
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
main() {
|
||||
failure="false"
|
||||
|
||||
make sort || failure="true"
|
||||
make validate || failure="true"
|
||||
|
||||
# Fail if any changes were made to the repo
|
||||
if [[ -n "(git status --short)" ]]; then
|
||||
failure="true"
|
||||
fi
|
||||
if [[ "${failure}" == "true" ]]; then
|
||||
echo "At least one check failed!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
main "${@}"
|
|
@ -0,0 +1,6 @@
|
|||
- hosts: all
|
||||
tasks:
|
||||
- name: Validate comps files
|
||||
ansible.builtin.command:
|
||||
chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
|
||||
cmd: ci/validate
|
Loading…
Reference in New Issue