generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check if the release image was created.
- Loading branch information
1 parent
f6566b2
commit 2d814a7
Showing
2 changed files
with
33 additions
and
0 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
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,30 @@ | ||
#!/bin/bash | ||
|
||
TIMEOUT=${1:-600} | ||
INTERVAL=${2:-20} | ||
TAG=${3:-latest} | ||
IMAGE=${4:-europe-docker.pkg.dev/kyma-project/prod/nats-manager} | ||
|
||
start_time=$(date +%s) | ||
end_time=$((start_time + TIMEOUT)) | ||
|
||
while true; do | ||
docker manifest inspect $IMAGE:$TAG | ||
# Check the exit status | ||
if [ $? -eq 0 ]; then | ||
echo "Image found." | ||
exit 0 | ||
else | ||
echo "Image not found, yet." | ||
fi | ||
|
||
current_time=$(date +%s) | ||
|
||
# Check if the TIMEOUT has been reached | ||
if [ $current_time -ge $end_time ]; then | ||
echo "TIMEOUT reached. Image was not found in time." | ||
exit 1 | ||
fi | ||
|
||
sleep $INTERVAL | ||
done |