Skip to content

Commit

Permalink
config: add source_config.yumrepos_ref
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jlebon committed Jan 27, 2023
1 parent f77ef4b commit 62529b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion jobs/build.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62529b8

Please sign in to comment.