From 84566678a9e32a716b36646c600cfca315fa2e56 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Thu, 9 Apr 2020 15:32:09 -0400 Subject: [PATCH] streams: disable bodhi-updates and next-devel for now There's more work needed before we can unblock those. For background, on bodhi-updates, see: https://github.com/coreos/fedora-coreos-config/pull/335#issuecomment-610634917 For the next-devel stream, see: https://github.com/coreos/fedora-coreos-tracker/issues/283#issuecomment-610974733 --- Jenkinsfile.development | 4 +++- Jenkinsfile.mechanical | 4 +++- Jenkinsfile.production | 4 +++- streams.groovy | 15 +++++++++++---- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile.development b/Jenkinsfile.development index b96071381..214704168 100644 --- a/Jenkinsfile.development +++ b/Jenkinsfile.development @@ -20,5 +20,7 @@ node { ) stream = streams.from_branch(change.GIT_BRANCH) - streams.build_stream(stream) + if (stream != "") { + streams.build_stream(stream) + } } diff --git a/Jenkinsfile.mechanical b/Jenkinsfile.mechanical index 2911fcdf1..f1c993bce 100644 --- a/Jenkinsfile.mechanical +++ b/Jenkinsfile.mechanical @@ -25,7 +25,9 @@ node { if (streams.triggered_by_push()) { stream = streams.from_branch(change.GIT_BRANCH) - streams.build_stream(stream) + if (stream != "") { + streams.build_stream(stream) + } } else { // cron or manual build: build all mechanical streams streams.mechanical.each{ streams.build_stream(it) } diff --git a/Jenkinsfile.production b/Jenkinsfile.production index 4c6334b1c..745b5196a 100644 --- a/Jenkinsfile.production +++ b/Jenkinsfile.production @@ -21,5 +21,7 @@ node { ) stream = streams.from_branch(change.GIT_BRANCH) - streams.build_stream(stream) + if (stream != "") { + streams.build_stream(stream) + } } diff --git a/streams.groovy b/streams.groovy index 459f5758c..b64393edc 100644 --- a/streams.groovy +++ b/streams.groovy @@ -1,18 +1,25 @@ // Canonical definition of all our streams and their type. production = ['testing', 'stable' /* , 'next' */] -development = ['testing-devel', 'next-devel'] -mechanical = ['bodhi-updates' /* , 'bodhi-updates-testing', 'branched', 'rawhide' */] +development = ['testing-devel' /* , 'next-devel' */] +mechanical = [/*'bodhi-updates', 'bodhi-updates-testing', 'branched', 'rawhide' */] + +all_streams = production + development + mechanical // Maps a list of streams to a list of GitSCM branches. def as_branches(streams) { return streams.collect{ [name: "origin/${it}"] } } -// Retrieves the stream name from a branch name. +// Retrieves the stream name from a branch name. Returns "" if branch doesn't +// correspond to a stream. def from_branch(branch) { assert branch.startsWith('origin/') - return branch['origin/'.length()..-1] + stream = branch['origin/'.length()..-1] + if (stream in all_streams) { + return stream + } + return "" } // Returns the default trigger for push notifications. This will trigger builds