Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jobs: pass fully qualified ref name to git ls-remote #840

Merged
merged 1 commit into from Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion jobs/build-arch.Jenkinsfile
Expand Up @@ -151,7 +151,7 @@ lock(resource: "build-${params.STREAM}-${basearch}") {
if (params.SRC_CONFIG_COMMIT) {
src_config_commit = params.SRC_CONFIG_COMMIT
} else {
src_config_commit = shwrapCapture("git ls-remote ${pipecfg.source_config.url} ${ref} | cut -d \$'\t' -f 1")
src_config_commit = shwrapCapture("git ls-remote ${pipecfg.source_config.url} refs/heads/${ref} | cut -d \$'\t' -f 1")
}

stage('Init') {
Expand Down
2 changes: 1 addition & 1 deletion jobs/build.Jenkinsfile
Expand Up @@ -150,7 +150,7 @@ lock(resource: "build-${params.STREAM}") {
pipeutils.addOptionalRootCA()

def ref = pipeutils.get_source_config_ref_for_stream(pipecfg, params.STREAM)
def src_config_commit = shwrapCapture("git ls-remote ${pipecfg.source_config.url} ${ref} | cut -d \$'\t' -f 1")
def src_config_commit = shwrapCapture("git ls-remote ${pipecfg.source_config.url} refs/heads/${ref} | cut -d \$'\t' -f 1")

stage('Init') {
def yumrepos = pipecfg.source_config.yumrepos ? "--yumrepos ${pipecfg.source_config.yumrepos}" : ""
Expand Down
2 changes: 1 addition & 1 deletion jobs/bump-lockfile.Jenkinsfile
Expand Up @@ -83,7 +83,7 @@ lock(resource: "bump-${params.STREAM}") {
def branch = params.STREAM
def forceTimestamp = false
def haveChanges = false
def src_config_commit = shwrapCapture("git ls-remote https://github.com/${repo} ${branch} | cut -d \$'\t' -f 1")
def src_config_commit = shwrapCapture("git ls-remote https://github.com/${repo} refs/heads/${branch} | cut -d \$'\t' -f 1")
def variant = stream_info.variant ? "--variant ${stream_info.variant}" : ""
shwrap("cosa init --branch ${branch} ${variant} --commit=${src_config_commit} https://github.com/${repo}")

Expand Down