#1422 [eln] Add Zuul CI
Merged a month ago by yselkowitz. Opened a month ago by yselkowitz.
yselkowitz/pungi-fedora eln  into  eln

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

+  - project:

+      check:

+        jobs:

+          - pungi-config-validate

+          - validate-prepopulate

+          - validate-variants

+ 

+  - job:

+      name: pungi-config-validate

+      description: Validate pungi configs

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

+ 

+  - job:

+      name: validate-prepopulate

+      description: Validate prepopulate.json file

+      run: ci/validate-prepopulate.yaml

+ 

+  - job:

+      name: validate-variants

+      description: Validate variants.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 eln*.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

@@ -0,0 +1,19 @@ 

+ #!/usr/bin/bash

+ 

+ set -euo pipefail

+ 

+ main() {

+     failure=0

+ 

+     jq -c . prepopulate.json > /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: ['jq']

+         state: present

+       become: yes

+     - name: Validate prepopulate.json file

+       ansible.builtin.command:

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

+         cmd: ci/validate-prepopulate

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

+ #!/usr/bin/bash

+ 

+ set -euo pipefail

+ 

+ main() {

+     failure=0

+ 

+     xmllint --noout variants.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 modified
-9
@@ -12,10 +12,6 @@ 

  COMPS_COMMAND = "make comps-eln.xml"

  

  

- MODULE_DEFAULTS_REPO = "https://pagure.io/releng/fedora-module-defaults.git"

- MODULE_DEFAULTS_BRANCH = "eln"

- 

- 

  VARIANTS_REPO = "https://pagure.io/pungi-fedora.git"

  VARIANTS_BRANCH = "eln"

  VARIANTS_FILE = "variants.xml"
@@ -34,10 +30,5 @@ 

  

  

  PKGSET_KOJI_TAG = "eln"

- PKGSET_KOJI_MODULE_TAG = "eln-modular"

  

  EXTRA_ISOS_ARCHES = ["x86_64"]

- 

- EXTRA_BUILDINSTALL_SKIP = ('^BaseOS$', {

-     'i386': True,

- })

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

+ {

+     "properties": {

+         "RELEASE_NAME": {"type": "string"},

+         "RELEASE_SHORT": {"type": "string"},

+         "RELEASE_VERSION": {"type": "string"},

+         "RELEASE_VERSION_X": {"$ref": "#/definitions/optional_string"},

+         "RELEASE_VERSION_Y": {"$ref": "#/definitions/optional_string"},

+         "RELEASE_VERSION_Z": {"$ref": "#/definitions/optional_string"},

+         "RELEASE_VERSION_XY": {"$ref": "#/definitions/optional_string"},

+         "RELEASE_VERSION_XYZ": {"$ref": "#/definitions/optional_string"},

+         "RUNROOT_CHANNEL": {"type": "string"},

+         "RUNROOT_TAG": {"type": "string"},

+         "PKGSET_KOJI_TAG": {"type": "string"},

+         "COMPS_REPO": {"type": "url"},

+         "COMPS_BRANCH": {"type": "string"},

+         "COMPS_FILE": {"type": "string"},

+         "COMPS_COMMAND": {"type": "string"},

+         "VARIANTS_REPO": {"type": "url"},

+         "VARIANTS_BRANCH": {"type": "string"},

+         "VARIANTS_FILE": {"type": "string"},

+         "GATHER_PREPOPULATE_REPO": {"type": "url"},

+         "GATHER_PREPOPULATE_BRANCH": {"type": "string"},

+         "GATHER_PREPOPULATE_COMMAND": {"type": "string"},

+         "GATHER_PREPOPULATE_FILE": {"type": "string"},

+         "EXTRA_FILES": {"$ref": "#/definitions/list_of_strings"},

+         "EXTRA_ISOS_ARCHES": {"$ref": "#/definitions/list_of_strings"},

+         "EXTRA_BUILDINSTALL_SKIP": {"type": "array"},

+         "IMAGE_BUILD_SCRATCH": {"type": "boolean"}

+     }

+ }

file modified
-1
@@ -6098,7 +6098,6 @@ 

          "texlive-wasysym.noarch",

          "texlive-wrapfig.noarch",

          "texlive-xcolor.noarch",

-         "texlive-xdvi.aarch64",

          "texlive-xecolor.noarch",

          "texlive-xecyr.noarch",

          "texlive-xeindex.noarch",

@@ -1,4 +1,3 @@ 

- bootable = True

  buildinstall_method = "lorax"

  

  image_name_format = {

file modified
-2
@@ -1,10 +1,8 @@ 

  release_name = RELEASE_NAME

  release_short = RELEASE_SHORT

  release_version = RELEASE_VERSION

- release_is_layered = False

  

  product_id_allow_missing = True

- productimg = False

  

  koji_profile = 'compose_koji'

  

file modified
-2
@@ -1,5 +1,3 @@ 

- runroot = True

- 

  global_runroot_method = "koji"

  

  runroot_method = {

no initial comment

pretty please pagure-ci rebuild

a month ago

Is something missing to make this work?

The @zuul user needs ticket privileges in this project.

And the Zuul people need to configure a project space so that a webhook can be configured in the Pagure project.

Thanks for doing this!

I did the "Configure the repo for zuul" part of this: https://fedoraproject.org/wiki/Zuul-based-ci#How_to_attach_a_Pagure_repository_on_Zuul

can you do the PR against https://pagure.io/fedora-project-config ?

Also, could you add a 'pungi-config-validate' check? That would be lovely...

can you do the PR against https://pagure.io/fedora-project-config ?

https://pagure.io/fedora-project-config/pull-request/336

Also, could you add a 'pungi-config-validate' check? That would be lovely...

How exactly? This fails despite ELN composes succeeding:

$ pungi-config-validate eln.conf 
WARNING: Config option release_is_layered was removed and has no effect; remove it. It's layered if there's configuration for base product.
WARNING: Config option runroot was removed and has no effect; remove it. Please specify 'runroot_method' if you want to enable runroot, otherwise run things locally.
WARNING: Config option bootable was removed and has no effect; remove it. Setting buildinstall_method option if you want a bootable installer.
WARNING: Config option productimg was removed and has no effect; remove it. Productimg phase has been removed.
WARNING: Unrecognized config option: RELEASE_VERSION_Z.
WARNING: Unrecognized config option: IMAGE_BUILD_SCRATCH.
WARNING: Unrecognized config option: GATHER_PREPOPULATE_BRANCH.
WARNING: Unrecognized config option: RUNROOT_TAG.
WARNING: Unrecognized config option: RELEASE_VERSION_XYZ.
WARNING: Unrecognized config option: EXTRA_ISOS_ARCHES.
WARNING: Unrecognized config option: GATHER_PREPOPULATE_REPO.
WARNING: Unrecognized config option: PKGSET_KOJI_TAG.
WARNING: Unrecognized config option: PKGSET_KOJI_MODULE_TAG.
WARNING: Unrecognized config option: VARIANTS_FILE.
WARNING: Unrecognized config option: RELEASE_VERSION_XY.
WARNING: Unrecognized config option: VARIANTS_BRANCH.
WARNING: Unrecognized config option: EXTRA_BUILDINSTALL_SKIP.
WARNING: Unrecognized config option: COMPS_REPO.
WARNING: Unrecognized config option: COMPS_FILE.
WARNING: Unrecognized config option: RUNROOT_CHANNEL.
WARNING: Unrecognized config option: COMPS_COMMAND.
WARNING: Unrecognized config option: RELEASE_VERSION_X.
WARNING: Unrecognized config option: RELEASE_SHORT.
WARNING: Unrecognized config option: COMPS_BRANCH.
WARNING: Unrecognized config option: RELEASE_NAME.
WARNING: Unrecognized config option: RELEASE_VERSION_Y.
WARNING: Unrecognized config option: GATHER_PREPOPULATE_COMMAND.
WARNING: Unrecognized config option: VARIANTS_REPO.
WARNING: Unrecognized config option: MODULE_DEFAULTS_REPO.
WARNING: Unrecognized config option: GATHER_PREPOPULATE_FILE.
WARNING: Unrecognized config option: MODULE_DEFAULTS_BRANCH.
WARNING: Unrecognized config option: RELEASE_VERSION.
WARNING: Unrecognized config option: EXTRA_FILES.

pretty please pagure-ci rebuild

a month ago

PR #1423 (for main) uses pungi-config-validate, but it seems that doesn't like custom variables, which ELN uses extensively. Before adding that here too, is there a "proper" way to fix/avoid that?

There also seems to be some legitimate deprecations that need to be fixed, which I'll work on.

1 new commit added

  • Remove deprecated config options
a month ago

rebased onto 8e0341d

a month ago

Modified per discussion in #1423.

1 new commit added

  • Add variants.xml validation
a month ago

6 new commits added

  • Add variants.xml validation
  • Add schema override
  • Add prepopulate.json validation
  • Add Zuul CI
  • Remove obsolete variables
  • Remove deprecated config options
a month ago

1 new commit added

  • Remove texlive-xdvi
a month ago

Pull-Request has been merged by yselkowitz

a month ago