From ce20e0045199434b9d2ab6aec4aecad6bde534c0 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Wed, 8 May 2024 22:16:38 +0200 Subject: [PATCH] Further use environment variables to align RPM pipelines This unifies RPM pipelines further by using environment variables that are already available. It makes some changes to Discourse to align them, other than that there should be no practical difference here. --- .../pipelines/release/pipelines/candlepin.groovy | 8 ++++---- theforeman.org/pipelines/release/pipelines/client.groovy | 4 ++-- .../pipelines/release/pipelines/foreman-rpm.groovy | 8 ++++---- theforeman.org/pipelines/release/pipelines/katello.groovy | 6 +++--- theforeman.org/pipelines/release/pipelines/plugins.groovy | 6 +++--- .../pipelines/release/pipelines/pulpcore.groovy | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/theforeman.org/pipelines/release/pipelines/candlepin.groovy b/theforeman.org/pipelines/release/pipelines/candlepin.groovy index 65edec96..4031e3e0 100644 --- a/theforeman.org/pipelines/release/pipelines/candlepin.groovy +++ b/theforeman.org/pipelines/release/pipelines/candlepin.groovy @@ -27,7 +27,7 @@ pipeline { stage('staging-repoclosure') { steps { script { - parallel repoclosures('candlepin', candlepin_distros, candlepin_version) + parallel repoclosures(env.PROJECT, candlepin_distros, env.VERSION) } } post { @@ -41,7 +41,7 @@ pipeline { steps { script { - runDuffyPipeline('candlepin-rpm', candlepin_version) + runDuffyPipeline("${env.PROJECT}-rpm", env.VERSION) } } } @@ -51,7 +51,7 @@ pipeline { steps { script { candlepin_distros.each { distro -> - push_foreman_staging_rpms('candlepin', candlepin_version, distro) + push_foreman_staging_rpms(env.PROJECT, env.VERSION, distro) } } } @@ -59,7 +59,7 @@ pipeline { } post { failure { - notifyDiscourse(env, "Candlepin ${candlepin_version} RPM pipeline failed:", currentBuild.description) + notifyDiscourse(env, "${env.PROJECT} ${env.VERSION} RPM pipeline failed:", currentBuild.description) } } } diff --git a/theforeman.org/pipelines/release/pipelines/client.groovy b/theforeman.org/pipelines/release/pipelines/client.groovy index e03dbbc1..04320452 100644 --- a/theforeman.org/pipelines/release/pipelines/client.groovy +++ b/theforeman.org/pipelines/release/pipelines/client.groovy @@ -27,7 +27,7 @@ pipeline { stage('staging-repoclosure') { steps { script { - parallel repoclosures('foreman-client-staging', foreman_client_distros, foreman_version) + parallel repoclosures("foreman-${env.PROJECT}-staging", foreman_client_distros, env.VERSION) } } post { @@ -42,7 +42,7 @@ pipeline { steps { script { foreman_client_distros.each { distro -> - push_foreman_staging_rpms('client', foreman_version, distro) + push_foreman_staging_rpms(env.PROJECT, env.VERSION, distro) } } } diff --git a/theforeman.org/pipelines/release/pipelines/foreman-rpm.groovy b/theforeman.org/pipelines/release/pipelines/foreman-rpm.groovy index c967eaa2..d83127ad 100644 --- a/theforeman.org/pipelines/release/pipelines/foreman-rpm.groovy +++ b/theforeman.org/pipelines/release/pipelines/foreman-rpm.groovy @@ -27,7 +27,7 @@ pipeline { stage('staging-repoclosure') { steps { script { - parallel repoclosures('foreman-staging', foreman_el_releases, foreman_version) + parallel repoclosures("${env.PROJECT}-staging", foreman_el_releases, env.VERSION) } } post { @@ -41,7 +41,7 @@ pipeline { steps { script { - runDuffyPipeline('foreman-rpm', foreman_version) + runDuffyPipeline("${env.PROJECT}-rpm", env.VERSION) } } } @@ -51,7 +51,7 @@ pipeline { steps { script { foreman_el_releases.each { distro -> - push_foreman_staging_rpms('foreman', foreman_version, distro) + push_foreman_staging_rpms(env.PROJECT, env.VERSION, distro) } } } @@ -59,7 +59,7 @@ pipeline { } post { failure { - notifyDiscourse(env, 'Foreman RPM nightly pipeline failed:', currentBuild.description) + notifyDiscourse(env, "${env.PROJECT} ${env.VERSION} RPM pipeline failed:", currentBuild.description) } } } diff --git a/theforeman.org/pipelines/release/pipelines/katello.groovy b/theforeman.org/pipelines/release/pipelines/katello.groovy index b3187640..3936736d 100644 --- a/theforeman.org/pipelines/release/pipelines/katello.groovy +++ b/theforeman.org/pipelines/release/pipelines/katello.groovy @@ -41,7 +41,7 @@ pipeline { steps { script { - runDuffyPipeline('katello-rpm', katello_version) + runDuffyPipeline("${env.PROJECT}-rpm", env.VERSION) } } } @@ -51,7 +51,7 @@ pipeline { steps { script { foreman_el_releases.each { distro -> - push_foreman_staging_rpms('katello', katello_version, distro) + push_foreman_staging_rpms(env.PROJECT, env.VERSION, distro) } } } @@ -59,7 +59,7 @@ pipeline { } post { failure { - notifyDiscourse(env, "Katello ${katello_version} pipeline failed:", currentBuild.description) + notifyDiscourse(env, "${env.PROJECT} ${env.VERSION} RPM pipeline failed:", currentBuild.description) } } } diff --git a/theforeman.org/pipelines/release/pipelines/plugins.groovy b/theforeman.org/pipelines/release/pipelines/plugins.groovy index 11cf06a7..0e04e473 100644 --- a/theforeman.org/pipelines/release/pipelines/plugins.groovy +++ b/theforeman.org/pipelines/release/pipelines/plugins.groovy @@ -24,7 +24,7 @@ pipeline { stage('staging-repoclosure') { steps { script { - parallel repoclosures('plugins-staging', foreman_el_releases, foreman_version) + parallel repoclosures("${env.PROJECT}-staging", foreman_el_releases, env.VERSION) } } post { @@ -39,7 +39,7 @@ pipeline { steps { script { foreman_el_releases.each { distro -> - push_foreman_staging_rpms('plugins', foreman_version, distro) + push_foreman_staging_rpms(env.PROJECT, env.VERSION, distro) } } } @@ -47,7 +47,7 @@ pipeline { } post { failure { - notifyDiscourse(env, "Plugins ${foreman_version} pipeline failed:", currentBuild.description) + notifyDiscourse(env, "${env.PROJECT} ${env.VERSION} RPM pipeline failed:", currentBuild.description) } } } diff --git a/theforeman.org/pipelines/release/pipelines/pulpcore.groovy b/theforeman.org/pipelines/release/pipelines/pulpcore.groovy index 9eae7f81..401a67b5 100644 --- a/theforeman.org/pipelines/release/pipelines/pulpcore.groovy +++ b/theforeman.org/pipelines/release/pipelines/pulpcore.groovy @@ -27,7 +27,7 @@ pipeline { stage('staging-repoclosure') { steps { script { - parallel repoclosures('pulpcore-staging', foreman_el_releases, foreman_version) + parallel repoclosures("${env.PROJECT}-staging", pulpcore_distros, env.VERSION) } } post { @@ -41,7 +41,7 @@ pipeline { steps { script { - runDuffyPipeline('pulpcore-rpm', pulpcore_version) + runDuffyPipeline("${env.PROJECT}-rpm", env.VERSION) } } } @@ -51,7 +51,7 @@ pipeline { steps { script { pulpcore_distros.each { distro -> - push_foreman_staging_rpms('pulpcore', pulpcore_version, distro) + push_foreman_staging_rpms(env.PROJECT, env.VERSION, distro) } } } @@ -59,7 +59,7 @@ pipeline { } post { failure { - notifyDiscourse(env, "Pulpcore ${pulpcore_version} RPM pipeline failed:", currentBuild.description) + notifyDiscourse(env, "${env.PROJECT} ${env.VERSION} RPM pipeline failed:", currentBuild.description) } } }