Skip to content

Commit 082af12

Browse files
committed
simplified the build and deploy script to cater for the actual containers
1 parent 9de79e9 commit 082af12

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

build-an-deploy.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ echo "For example docker-desktop with its included k8s cluster"
77
echo "Usage: ./build-an-deploy.sh"
88

99
source ./scripts/check-available-commands.sh
10-
checkCommandsAvailable helm docker kubectl
10+
checkCommandsAvailable helm docker kubectl yq
1111

1212
version="$(uuidgen)"
13-
13+
WRONGSECRETS_IMAGE=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.wrongsecrets.image')
14+
WRONGSECRETS_TAG=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.wrongsecrets.tag')
15+
WEBTOP_IMAGE=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.virtualdesktop.image')
16+
WEBTOP_TAG=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.virtualdesktop.tag')
17+
echo "Pulling in required images to actually run $WRONGSECRETS_IMAGE:$WRONGSECRETS_TAG & $WEBTOP_IMAGE:$WEBTOP_TAG."
18+
echo "If you see an authentication failure: pull them manually by the following 2 commands"
19+
echo "'docker pull $WRONGSECRETS_IMAGE:$WRONGSECRETS_TAG'"
20+
echo "'docker pull jeroenwillemsen/jeroenwillemsen/$WEBTOP_IMAGE:$WEBTOP_TAG'" &
21+
docker pull $WRONGSECRETS_IMAGE:$WRONGSECRETS_TAG &
22+
docker pull jeroenwillemsen/jeroenwillemsen/$WEBTOP_IMAGE:$WEBTOP_TAG &
1423
docker build -t local/wrongsecrets-balancer:$version ./wrongsecrets-balancer &
1524
docker build -t local/cleaner:$version ./cleaner &
16-
docker pull jeroenwillemsen/wrongsecrets:1.5.8-no-vault
1725
wait
1826

1927
helm upgrade --install mj ./helm/wrongsecrets-ctf-party --set="imagePullPolicy=Never" --set="balancer.repository=local/wrongsecrets-balancer" --set="balancer.tag=$version" --set="wrongsecretsCleanup.repository=local/cleaner" --set="wrongsecretsCleanup.tag=$version"

0 commit comments

Comments
 (0)