From 8ae7d1610cf28391e6da11209ee9da17b86cc297 Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Tue, 23 Apr 2024 09:55:58 +0200 Subject: [PATCH] bodhi: adjust config for staging instance Signed-off-by: Mattia Verga --- roles/bodhi2/base/templates/production.ini.j2 | 42 +++++++++++++++++++ .../bodhi/templates/dockerfile-base | 2 +- .../bodhi/templates/dockerfile-critpathcron | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/roles/bodhi2/base/templates/production.ini.j2 b/roles/bodhi2/base/templates/production.ini.j2 index 0427795141..bc9fa2344f 100644 --- a/roles/bodhi2/base/templates/production.ini.j2 +++ b/roles/bodhi2/base/templates/production.ini.j2 @@ -548,6 +548,13 @@ critpath.jsonpath = /etc/bodhi/critpath # files. This is used if critpath.type is not defined. # critpath_pkgs = +{% if env == 'staging' %} + +# The net karma required to submit a critial path update to a pending release. +# min_karma = 2 + +{% else %} + # The number of admin approvals it takes to be able to push a critical path # update to stable for a pending release. # critpath.num_admin_approvals = 2 @@ -556,6 +563,8 @@ critpath.num_admin_approvals = 0 # The net karma required to submit a critial path update to a pending release. # critpath.min_karma = 2 +{% endif %} + # Allow critpath to submit for stable after 2 weeks with no negative karma # critpath.stable_after_days_without_negative_karma = 14 @@ -579,6 +588,38 @@ fedora_modular.mandatory_days_in_testing = 7 # critpath number of admin approvals, and the critpath minimum karma. For example, if we want to set # Fedora 28 as a pre-beta, and we want it to have different rules in pre-beta and post-beta, we # could do something like this: + +{% if env == 'staging' %} + +{% if FedoraBranchedBodhi is defined and FedoraBranchedBodhi == 'preenable' %} +f{{ FedoraBranchedNumber }}.status = pre_beta +f{{ FedoraBranchedNumber }}.pre_beta.mandatory_days_in_testing = 0 +f{{ FedoraBranchedNumber }}.pre_beta.min_karma = 0 +f{{ FedoraBranchedNumber }}.pre_beta.critpath.mandatory_days_in_testing = 0 +{% elif FedoraBranchedBodhi is defined and FedoraBranchedBodhi == 'prebeta' %} +f{{ FedoraBranchedNumber }}.status = pre_beta +f{{ FedoraBranchedNumber }}.pre_beta.mandatory_days_in_testing = 3 +f{{ FedoraBranchedNumber }}.pre_beta.min_karma = 1 +f{{ FedoraBranchedNumber }}.pre_beta.critpath.mandatory_days_in_testing = 14 +{% elif FedoraBranchedBodhi is defined and FedoraBranchedBodhi == 'postbeta' %} +f{{ FedoraBranchedNumber }}.status = post_beta +f{{ FedoraBranchedNumber }}.post_beta.mandatory_days_in_testing = 7 +f{{ FedoraBranchedNumber }}.post_beta.min_karma = 2 +f{{ FedoraBranchedNumber }}.post_beta.critpath.stable_after_days_without_negative_karma = 14 +{% endif %} + +# Rawhide layered containers are shipped through bodhi and rawhide containers not require any day +# in testing +f{{ FedoraRawhideNumber }}c.status = pre_beta +f{{ FedoraRawhideNumber }}c.pre_beta.mandatory_days_in_testing = 0 +# Rawhide gating - Updates in rawhide don't require any days in testing. +f{{ FedoraRawhideNumber }}.status = pre_beta +f{{ FedoraRawhideNumber }}.pre_beta.mandatory_days_in_testing = 0 +f{{ FedoraRawhideNumber }}.pre_beta.min_karma = 0 +f{{ FedoraRawhideNumber }}.pre_beta.critpath.mandatory_days_in_testing = 0 + +{% else %} + {% if FedoraBranchedBodhi is defined and FedoraBranchedBodhi == 'preenable' %} f{{ FedoraBranchedNumber }}.status = pre_beta f{{ FedoraBranchedNumber }}.pre_beta.mandatory_days_in_testing = 0 @@ -606,6 +647,7 @@ f{{ FedoraRawhideNumber }}.pre_beta.mandatory_days_in_testing = 0 f{{ FedoraRawhideNumber }}.pre_beta.critpath.min_karma = 0 f{{ FedoraRawhideNumber }}.pre_beta.critpath.stable_after_days_without_negative_karma = 0 +{% endif %} # ELN gating - Updates in ELN don't require any days in testing. eln.status = pre_beta diff --git a/roles/openshift-apps/bodhi/templates/dockerfile-base b/roles/openshift-apps/bodhi/templates/dockerfile-base index 3da18ebf5a..6d0ae40443 100644 --- a/roles/openshift-apps/bodhi/templates/dockerfile-base +++ b/roles/openshift-apps/bodhi/templates/dockerfile-base @@ -1,5 +1,5 @@ {% if env == "staging" %} -FROM fedora:39 +FROM fedora:40 {% else %} FROM fedora:38 {% endif %} diff --git a/roles/openshift-apps/bodhi/templates/dockerfile-critpathcron b/roles/openshift-apps/bodhi/templates/dockerfile-critpathcron index d2f60ec9b5..e3a7fcc348 100644 --- a/roles/openshift-apps/bodhi/templates/dockerfile-critpathcron +++ b/roles/openshift-apps/bodhi/templates/dockerfile-critpathcron @@ -1,5 +1,5 @@ {% if env == "staging" %} -FROM fedora:39 +FROM fedora:40 {% else %} FROM fedora:38 {% endif %}