chore(helm): check github availability before clone
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
d7cb49d490
commit
f5949cc08e
1 changed files with 17 additions and 1 deletions
|
|
@ -74,7 +74,23 @@ spec:
|
|||
- |
|
||||
set -x
|
||||
mkdir -p /opt/openreplay/openreplay && cd /opt/openreplay/openreplay
|
||||
git clone {{ .Values.global.dbMigrationUpstreamRepoURL | default "https://github.com/openreplay/openreplay" }} .
|
||||
|
||||
# Function to check if GitHub is available
|
||||
check_github() {
|
||||
for i in {1..10}; do
|
||||
if ping -c 1 github.com &> /dev/null; then
|
||||
echo "GitHub is available."
|
||||
git clone {{ .Values.global.dbMigrationUpstreamRepoURL | default "https://github.com/openreplay/openreplay" }} .
|
||||
break
|
||||
else
|
||||
echo "GitHub is not available. Retrying in 3 seconds..."
|
||||
sleep 3
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
check_github
|
||||
|
||||
ls /opt/openreplay/openreplay
|
||||
git checkout {{ default .Chart.AppVersion .Values.dbMigrationUpstreamBranch }} || exit 10
|
||||
git log -1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue