From 577508a476cd496aaf8b2781f98befc5cded985e Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Mon, 17 Jun 2019 16:22:54 -0400 Subject: [PATCH] pipeline: split out streams.groovy module This module will hold the canonical definition for all our streams. This in effect also adds `testing-devel` and `bodhi-updates` to the list of supported streams. --- Jenkinsfile | 10 ++++------ streams.groovy | 7 +++++++ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 streams.groovy diff --git a/Jenkinsfile b/Jenkinsfile index f6ac7b8ea..cafd908d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,9 @@ -def pod, utils, prod, prod_jenkins, devel_prefix, src_config_url, src_config_ref, s3_bucket +def utils, streams, prod, prod_jenkins, devel_prefix, src_config_url, src_config_ref, s3_bucket node { checkout scm - pod = readFile(file: "manifests/pod.yaml") utils = load("utils.groovy") + streams = load("streams.groovy") + pod = readFile(file: "manifests/pod.yaml") // just autodetect if we're in prod or not prod_jenkins = (env.JENKINS_URL == 'https://jenkins-fedora-coreos.apps.ci.centos.org/') @@ -34,10 +35,7 @@ properties([ pipelineTriggers(prod ? [cron("H/30 * * * *")] : []), parameters([ choice(name: 'STREAM', - // XXX: Just pretend we're the testing stream for now... in - // reality, we're closer to what "bodhi-updates" will be. Though the - // testing stream is the main stream. - choices: ['testing' /*, 'stable', 'testing-devel', 'bodhi-updates', etc... */ ], + choices: (streams.prod + streams.devel + streams.mechanical), description: 'Fedora CoreOS stream to build', required: true), booleanParam(name: 'FORCE', diff --git a/streams.groovy b/streams.groovy new file mode 100644 index 000000000..a06f95b36 --- /dev/null +++ b/streams.groovy @@ -0,0 +1,7 @@ +// Canonical definition of all our streams and their type. + +prod = ['testing' /* , 'stable', 'next' */] +devel = ['testing-devel' /* , 'next-devel' */] +mechanical = ['bodhi-updates' /* , 'bodhi-updates-testing', 'branched', 'rawhide' */] + +return this