Skip to content

Commit 09f8a73

Browse files
committed
jobs: get source config ref using new helper
We need the ref override logic everywhere that wants to clone the repo.
1 parent 84953ea commit 09f8a73

6 files changed

+12
-6
lines changed

jobs/kola-aws.Jenkinsfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ try { timeout(time: 90, unit: 'MINUTES') {
6262
}
6363
withCredentials([file(variable: 'AWS_CONFIG_FILE',
6464
credentialsId: 'aws-build-upload-config')]) {
65+
def ref = pipeutils.get_source_config_ref_for_stream(pipecfg, params.STREAM)
6566
shwrap("""
66-
cosa init --branch ${params.STREAM} ${commitopt} ${pipecfg.source_config.url}
67+
cosa init --branch ${ref} ${commitopt} ${pipecfg.source_config.url}
6768
cosa buildfetch --artifact=ostree --build=${params.VERSION} \
6869
--arch=${params.ARCH} --url=s3://${s3_stream_dir}/builds
6970
""")

jobs/kola-azure.Jenkinsfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ lock(resource: "kola-azure-${params.ARCH}") {
7272
// Grab the metadata. Also grab the image so we can upload it.
7373
withCredentials([file(variable: 'AWS_CONFIG_FILE',
7474
credentialsId: 'aws-build-upload-config')]) {
75+
def ref = pipeutils.get_source_config_ref_for_stream(pipecfg, params.STREAM)
7576
shwrap("""
76-
cosa init --branch ${params.STREAM} ${commitopt} ${pipecfg.source_config.url}
77+
cosa init --branch ${ref} ${commitopt} ${pipecfg.source_config.url}
7778
cosa buildfetch --build=${params.VERSION} --arch=${params.ARCH} \
7879
--url=s3://${s3_stream_dir}/builds --artifact=azure
7980
cosa decompress --build=${params.VERSION} --artifact=azure

jobs/kola-gcp.Jenkinsfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ try { timeout(time: 30, unit: 'MINUTES') {
6262
}
6363
withCredentials([file(variable: 'AWS_CONFIG_FILE',
6464
credentialsId: 'aws-build-upload-config')]) {
65+
def ref = pipeutils.get_source_config_ref_for_stream(pipecfg, params.STREAM)
6566
shwrap("""
66-
cosa init --branch ${params.STREAM} ${commitopt} ${pipecfg.source_config.url}
67+
cosa init --branch ${ref} ${commitopt} ${pipecfg.source_config.url}
6768
cosa buildfetch --artifact=ostree --build=${params.VERSION} \
6869
--arch=${params.ARCH} --url=s3://${s3_stream_dir}/builds
6970
""")

jobs/kola-kubernetes.Jenkinsfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ try { timeout(time: 60, unit: 'MINUTES') {
5858
}
5959
withCredentials([file(variable: 'AWS_CONFIG_FILE',
6060
credentialsId: 'aws-build-upload-config')]) {
61+
def ref = pipeutils.get_source_config_ref_for_stream(pipecfg, params.STREAM)
6162
shwrap("""
62-
cosa init --branch ${params.STREAM} ${commitopt} ${pipecfg.source_config.url}
63+
cosa init --branch ${ref} ${commitopt} ${pipecfg.source_config.url}
6364
cosa buildfetch --build=${params.VERSION} \
6465
--arch=${params.ARCH} --url=s3://${s3_stream_dir}/builds
6566
""")

jobs/kola-openstack.Jenkinsfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ lock(resource: "kola-openstack-${params.ARCH}") {
7373
// Grab the metadata. Also grab the image so we can upload it.
7474
withCredentials([file(variable: 'AWS_CONFIG_FILE',
7575
credentialsId: 'aws-build-upload-config')]) {
76+
def ref = pipeutils.get_source_config_ref_for_stream(pipecfg, params.STREAM)
7677
shwrap("""
77-
cosa init --branch ${params.STREAM} ${commitopt} ${pipecfg.source_config.url}
78+
cosa init --branch ${ref} ${commitopt} ${pipecfg.source_config.url}
7879
cosa buildfetch --build=${params.VERSION} --arch=${params.ARCH} \
7980
--url=s3://${s3_stream_dir}/builds --artifact=openstack
8081
cosa decompress --build=${params.VERSION} --artifact=openstack

jobs/release.Jenkinsfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ try {
7070
stage('Fetch Metadata') {
7171
withCredentials([file(variable: 'AWS_CONFIG_FILE',
7272
credentialsId: 'aws-build-upload-config')]) {
73+
def ref = pipeutils.get_source_config_ref_for_stream(pipecfg, params.STREAM)
7374
shwrap("""
74-
cosa init --branch ${params.STREAM} ${pipecfg.source_config.url}
75+
cosa init --branch ${ref} ${pipecfg.source_config.url}
7576
cosa buildfetch --artifact=ostree --build=${params.VERSION} \
7677
--arch=all --url=s3://${s3_stream_dir}/builds
7778
""")

0 commit comments

Comments
 (0)