Skip to content

Commit fd08081

Browse files
committed
do spin build and push for test apps
Signed-off-by: Rajat Jindal <[email protected]>
1 parent 2414b97 commit fd08081

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/up.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ IMAGES=("spin-hello-world" "spin-keyvalue" "spin-outbound-redis" "spin-multi-tri
1313
docker build -t k3d-shim-test "$dockerfile_path"
1414

1515
k3d cluster create "$cluster_name" \
16-
--image k3d-shim-test --api-port 6551 -p '8082:80@loadbalancer' --agents 2
16+
--image k3d-shim-test --api-port 6551 -p '8082:80@loadbalancer' --agents 2 \
17+
--registry-create test-registry:0.0.0.0:5000
1718

1819
kubectl wait --for=condition=ready node --all --timeout=120s
1920

@@ -23,6 +24,12 @@ for i in "${!DOCKER_IMAGES[@]}"; do
2324
mkdir -p "${OUT_DIRS[$i]}"
2425
docker save -o "${OUT_DIRS[$i]}/img.tar" "${IMAGES[$i]}:latest"
2526
k3d image import "${OUT_DIRS[$i]}/img.tar" -c "$cluster_name"
27+
28+
## also do spin builds and spin registry push
29+
## images pushed as localhost:5000/<namespace>/<app>:<version>
30+
## can be pulled as registry:5000/<namespace>/<app>:<version> from within k3d cluster
31+
spin build -f "./images/${DOCKER_IMAGES[$i]}/spin.toml"
32+
spin registry push "localhost:5000/spin-registry-push/${IMAGES[$i]}:latest" -f "./images/${DOCKER_IMAGES[$i]}/spin.toml" -k
2633
done
2734

2835
sleep 5

0 commit comments

Comments
 (0)