#1423 [main] Add Zuul CI
Merged 9 days ago by kevin. Opened a month ago by yselkowitz.
yselkowitz/pungi-fedora main  into  main

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

+  - project:

+      check:

+        jobs:

+          - pungi-config-validate

+          - validate-variants

+ 

+  - job:

+      name: pungi-config-validate

+      description: Validate pungi configs

+      run: ci/pungi-config-validate.yaml

+ 

+  - job:

+      name: validate-variants

+      description: Validate variants-fedora.xml file

+      run: ci/validate-variants.yaml

@@ -0,0 +1,26 @@ 

+ #!/usr/bin/bash

+ 

+ set -euo pipefail

+ 

+ main() {

+     failure=0

+ 

+     args=

+     if [ -f override.json ]; then

+         args="--schema-override override.json"

+     fi

+ 

+     for f in fedora*.conf; do

+         pungi-config-validate $args $f > /dev/null 2>&1 || {

+             echo "Validation of $f failed!"

+             ((failure+=1))

+         }

+     done

+ 

+     if [[ $failure -gt 0 ]]; then

+         echo "${failure} check(s) failed!"

+         exit 1

+     fi

+ }

+ 

+ main "${@}"

@@ -0,0 +1,11 @@ 

+ - hosts: all

+   tasks:

+     - name: Install needed packages

+       package:

+         name: ['pungi-utils']

+         state: present

+       become: yes

+     - name: Validate pungi configs

+       ansible.builtin.command:

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

+         cmd: ci/pungi-config-validate

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

+ #!/usr/bin/bash

+ 

+ set -euo pipefail

+ 

+ main() {

+     failure=0

+ 

+     xmllint --noout variants-fedora.xml > /dev/null 2>&1 || {

+         echo "Validate failed!"

+         ((failure+=1))

+     }

+ 

+     if [[ $failure -gt 0 ]]; then

+         echo "${failure} check(s) failed!"

+         exit 1

+     fi

+ }

+ 

+ main "${@}"

@@ -0,0 +1,11 @@ 

+ - hosts: all

+   tasks:

+     - name: Install needed packages

+       package:

+         name: ['libxml2']

+         state: present

+       become: yes

+     - name: Validate variants.xml file

+       ansible.builtin.command:

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

+         cmd: ci/validate-variants

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

+ {

+   "properties": {

+     "KIWI_ISO_VOLID_VERSION": {"type": "string"}

+   }

+ }

fedora.conf currently reports WARNING: Unrecognized config option: KIWI_ISO_VOLID_VERSION. p-c-v doesn't seem to like custom variables; is there a "proper" way to fix/avoid this?

FWIW this works as-is with f41, f40, and (once modified to use epel.conf instead of fedora*.conf) epel10 branches.

I am not sure how to avoid those warnings. Perhaps @lsedlar knows?

But yeah, they are just warnings...

They are warnings, but p-c-v exits 1 even then. Only a completely clean config exits 0. Unless we just can't/shouldn't rely on the exit code for this?

It seems a schema override might be in order here: https://pagure.io/pungi/pull-request/1341 ?

rebased onto dbfae3a

a month ago

This version allows for an optional override.json file to define the custom variables (seen as unknown properties otherwise). Let me know if you prefer a different name for this file.

2 new commits added

  • Add schema override
  • Add Zuul CI
a month ago

1 new commit added

  • Add variants-fedora.xml validation
a month ago

LGTM for the most part, but is there a reason to suppress the xmllint output? I'd think if it fails, we'd want to see the reason.

I was hoping @lsedlar would chime in, but I suppose we can just merge this now and adjust if we need to.

Pull-Request has been merged by kevin

9 days ago