Skip to content

Commit

Permalink
fix variable definition in kola GCP pipeline
Browse files Browse the repository at this point in the history
We were getting an error because we defined no_gcp_image twice. Let's
just get rid of it altogether and just use gcp_image for everything.
  • Loading branch information
dustymabe authored and jlebon committed May 13, 2020
1 parent 2205bd8 commit 8b55171
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Jenkinsfile.kola.gcp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ def pod_label = "cosa-${UUID.randomUUID().toString()}"

podTemplate(cloud: 'openshift', label: pod_label, yaml: pod) {
node(pod_label) { container('coreos-assembler') {
def gcp_image, no_gcp_image
def no_gcp_image = false
def gcp_image = ""
// we'll want to get the image project from the meta.json in the
// future, but it's not in there for now.
// def gcp_image_project
Expand All @@ -61,13 +60,11 @@ podTemplate(cloud: 'openshift', label: pod_label, yaml: pod) {
def meta = readJSON file: meta_json
if (meta.gcp.image) {
gcp_image = meta.gcp.image
} else {
no_gcp_image = true
}
}

// fail immediately if the build contained no GCP image
if (no_gcp_image) {
if (gcp_image == "") {
currentBuild.result = 'FAILURE'
return
}
Expand Down

0 comments on commit 8b55171

Please sign in to comment.