From 63467ad003d03a9d318cf69ebc621ffe8b6644a2 Mon Sep 17 00:00:00 2001 From: Aleksandra Fedorova Date: Jun 27 2023 08:39:52 +0000 Subject: Add ELN scratch builds job Adding check-for-eln job which verifies whether the project is part of Fedora ELN. If yes it adds eln-scratch-rpm-build jobs to the list of all jobs for this project. See also: https://github.com/fedora-eln/eln/issues/75 --- diff --git a/FZCI.dhall/fedora-zuul-jobs-config/jobs.dhall b/FZCI.dhall/fedora-zuul-jobs-config/jobs.dhall index 76d5a41..7588fcf 100644 --- a/FZCI.dhall/fedora-zuul-jobs-config/jobs.dhall +++ b/FZCI.dhall/fedora-zuul-jobs-config/jobs.dhall @@ -81,6 +81,15 @@ let check_for_fmf_tests = , nodeset = Some executor_nodeset } +let check_for_eln = + Zuul.Job::{ + , name = "${job-prefix}check-for-eln" + , description = Some "Check the project is in ELN" + , branches = Some [ "rawhide" ] + , run = Some "playbooks/rpm/check-for-eln.yaml" + , nodeset = Some executor_nodeset + } + let check_for_arches = Zuul.Job::{ , name = "${job-prefix}check-for-arches" @@ -131,6 +140,22 @@ let common_koji_rpm_build = [ Zuul.Job.Secret::{ name = "krb_keytab", secret = "krb_keytab" } ] } +let eln_rpm_scratch_build = + Zuul.Job::{ + , name = "${job-prefix}eln-rpm-scratch-build" + , parent = Some (Zuul.Job.getName common_koji_rpm_build) + , final = Some True + , provides = Some [ "${job-prefix}repo" ] + , dependencies = Some [ Zuul.Job.Dependency.Name "${job-prefix}check-for-eln" ] + , branches = Some [ "rawhide" ] + , vars = Some + ( Zuul.Vars.object + [ { mapKey = "target", mapValue = Zuul.Vars.string "eln" } + , { mapKey = "branch", mapValue = Zuul.Vars.string "rawhide" } + ] + ) + } + let setVars = λ(target : Text) → λ(release : Text) → @@ -305,6 +330,8 @@ let Jobs = , check_for_fmf_tests , check_for_arches , common_koji_rpm_build + , check_for_eln + , eln_rpm_scratch_build ] # generateRpmBuildJobs KojiBuild.Type.Scratch # generateRpmBuildJobs KojiBuild.Type.Final diff --git a/FZCI.dhall/fedora-zuul-jobs/templates.dhall b/FZCI.dhall/fedora-zuul-jobs/templates.dhall index 9bec406..969b30e 100644 --- a/FZCI.dhall/fedora-zuul-jobs/templates.dhall +++ b/FZCI.dhall/fedora-zuul-jobs/templates.dhall @@ -29,7 +29,10 @@ let build = Zuul.ProjectTemplate.Pipeline Zuul.Project.PipelineConfig::{ , jobs = - [ Zuul.Job.Name "check-for-arches" ] + [ Zuul.Job.Name "check-for-arches" + , Zuul.Job.Name "check-for-eln" + , Zuul.Job.Name "eln-rpm-scratch-build" + ] # createSBJobsForArches } }