-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create seperate file for install_KinD_create_KinD_cluster_install_kus…
…tomize.sh to avoid code repitition Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
- Loading branch information
1 parent
029b269
commit 41b2444
Showing
2 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/gh-actions/install_KinD_create_KinD_cluster_install_kustomize.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Function to handle errors | ||
handle_error() { | ||
echo "Error: $1" | ||
exit 1 | ||
} | ||
|
||
# Install KinD | ||
echo "Installing KinD..." | ||
if ! ./tests/gh-actions/install_kind.sh; then | ||
handle_error "Failed to install KinD" | ||
fi | ||
|
||
# Create KinD Cluster | ||
echo "Creating KinD Cluster..." | ||
if ! kind create cluster --config tests/gh-actions/kind-cluster.yaml; then | ||
handle_error "Failed to create KinD cluster" | ||
fi | ||
|
||
# Install kustomize | ||
echo "Installing kustomize..." | ||
if ! ./tests/gh-actions/install_kustomize.sh; then | ||
handle_error "Failed to install kustomize" | ||
fi | ||
|
||
echo "All steps completed successfully." |