Skip to content

Commit 456beae

Browse files
committed
cci.jenkinsfile: add in workaround for pod pull issue
We are seeing an issue where the first time we try to create a pod from a just created image it fails. Here we bake in an initial pod that we allow to fail to work around the problem while we investigate.
1 parent a876a9b commit 456beae

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.cci.jenkinsfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,20 @@ properties([
99
// an imageStream for it
1010
def cpuCount = 6
1111
def cpuCount_s = cpuCount.toString()
12+
def memory = (cpuCount * 1536) as Integer
1213
def imageName = buildImage(env: [ENABLE_GO_RACE_DETECTOR: "1", GOMAXPROCS: cpuCount_s], cpu: cpuCount_s)
1314

14-
def memory = (cpuCount * 1536) as Integer
15+
// We are seeing an issue where the first time we try to create a pod
16+
// from a just created image it fails. Here we bake in an initial pod
17+
// that we allow to fail to work around the problem while we investigate.
18+
try {
19+
pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memory}Mi") {
20+
shwrap("Initial pod creation worked!")
21+
}
22+
} catch(e) {
23+
echo "Initial pod creation failed. Continuing."
24+
}
25+
1526
pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memory}Mi") {
1627
checkout scm
1728

0 commit comments

Comments
 (0)