Skip to content

Commit 97e8157

Browse files
committed
Try running curl instead.
1 parent c7bdcfe commit 97e8157

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

deploy/tasks/buildah-oci-ta.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ spec:
158158
- name: INTERNAL_NON_PROXY_HOSTS
159159
description: Comma separated list of target hosts that bypass the proxy used internally by the domain proxy.
160160
type: string
161+
- name: CACHE_HOST
162+
description: Cache host.
163+
type: string
161164
results:
162165
- name: IMAGE_DIGEST
163166
description: Digest of the image just built
@@ -257,6 +260,8 @@ spec:
257260
value: $(params.INTERNAL_PROXY_PASSWORD)
258261
- name: INTERNAL_NON_PROXY_HOSTS
259262
value: $(params.INTERNAL_NON_PROXY_HOSTS)
263+
- name: CACHE_HOST
264+
value: $(params.CACHE_HOST)
260265
volumeMounts:
261266
- mountPath: /shared
262267
name: shared
@@ -525,7 +530,10 @@ spec:
525530
526531
# With expansion
527532
cat >> /app/build-script.sh << EOF
528-
buildah build $VOLUME_MOUNTS ${BUILDAH_ARGS[@]} ${LABELS[@]} --tls-verify=$TLSVERIFY --no-cache --ulimit nofile=4096:4096 -f "$dockerfile_copy" -t $IMAGE .
533+
for ((i=1; i<=10000; i++)); do
534+
echo "request #$i"
535+
curl -v -x http://localhost:8080 "http://${CACHE_HOST}/v2/cache/rebuild-central/1658389751000/org/sonatype/oss/oss-parent/7/oss-parent-7.pom"
536+
done
529537
EOF
530538
531539
# Without expansion

pkg/reconciler/dependencybuild/buildrecipeyaml.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,13 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
587587
StringVal: whitelistUrl.Host + ",localhost",
588588
},
589589
},
590+
{
591+
Name: "CACHE_HOST",
592+
Value: tektonpipeline.ParamValue{
593+
Type: tektonpipeline.ParamTypeString,
594+
StringVal: whitelistUrl.Host,
595+
},
596+
},
590597
},
591598
}}, ps.Tasks...)
592599

0 commit comments

Comments
 (0)