From 62529b86f924f79114fac7475f468383ae22dc6c Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 24 Jan 2023 18:42:10 -0500 Subject: [PATCH] config: add `source_config.yumrepos_ref` This allows specifying a different ref than the default when cloning the yumrepos git repo. We're only planning to use this in the hotfix path for RHCOS. --- docs/config.yaml | 2 ++ jobs/build.Jenkinsfile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/config.yaml b/docs/config.yaml index 83c0266e0..45bb3e8e7 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -7,6 +7,8 @@ source_config: ref: release-${STREAM} # OPTIONAL: git repo URL for yumrepos yumrepos: https://gitlab.example.com/sooper/seekret + # OPTIONAL: git repo ref for yumrepos + yumrepos_ref: devel # OPTIONAL: default artifacts to build per architecture default_artifacts: diff --git a/jobs/build.Jenkinsfile b/jobs/build.Jenkinsfile index 7fa316a3e..c3bc52cb3 100644 --- a/jobs/build.Jenkinsfile +++ b/jobs/build.Jenkinsfile @@ -140,9 +140,10 @@ lock(resource: "build-${params.STREAM}") { stage('Init') { def yumrepos = pipecfg.source_config.yumrepos ? "--yumrepos ${pipecfg.source_config.yumrepos}" : "" + def yumrepos_ref = pipecfg.source_config.yumrepos_ref ? "--yumrepos-branch ${pipecfg.source_config.yumrepos_ref}" : "" def variant = stream_info.variant ? "--variant ${stream_info.variant}" : "" shwrap(""" - cosa init --force --branch ${ref} --commit=${src_config_commit} ${yumrepos} ${variant} ${pipecfg.source_config.url} + cosa init --force --branch ${ref} --commit=${src_config_commit} ${yumrepos} ${yumrepos_ref} ${variant} ${pipecfg.source_config.url} """) // for now, just use the PVC to keep cache.qcow2 in a stream-specific dir