commit by to_remotes 2023-09-20 12:26:35 +0200 from vmdevhw
parent
1ecb2503d4
commit
2bea40e54d
32
init.sh
32
init.sh
|
|
@ -7,6 +7,29 @@ echo " basic init of wiseadvice node "
|
||||||
echo "################################################"
|
echo "################################################"
|
||||||
|
|
||||||
|
|
||||||
|
function clone_repo_with_retry(){
|
||||||
|
REPO_NAME=$1
|
||||||
|
echo "starting to pull into $(pwd)"
|
||||||
|
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/$REPO_NAME.git -b main
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo " "
|
||||||
|
echo -n "Have you checked? Should we try again? type yes: "
|
||||||
|
read -r yes_no
|
||||||
|
if [ "$yes_no" = "yes" ]; then
|
||||||
|
echo "starting to pull into $(pwd)"
|
||||||
|
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/$REPO_NAME.git -b main
|
||||||
|
else
|
||||||
|
echo "Aborting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "Aborting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [ -d "$WA_REPO" ]; then
|
if [ -d "$WA_REPO" ]; then
|
||||||
echo "$WA_REPO does exist, skipping cloning"
|
echo "$WA_REPO does exist, skipping cloning"
|
||||||
source $WA_REPO/export_client_name.sh
|
source $WA_REPO/export_client_name.sh
|
||||||
|
|
@ -52,17 +75,16 @@ Host git.service.wiseadvice.eu
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
rm -rf $WA_REPO
|
|
||||||
mkdir -p $WA_REPO
|
mkdir -p $WA_REPO
|
||||||
|
|
||||||
echo "export CLIENT_NAME=$CLIENT_NAME" > $WA_REPO/export_client_name.sh
|
echo "export CLIENT_NAME=$CLIENT_NAME" > $WA_REPO/export_client_name.sh
|
||||||
source $WA_REPO/export_client_name.sh
|
source $WA_REPO/export_client_name.sh
|
||||||
|
|
||||||
cd $WA_REPO
|
cd $WA_REPO
|
||||||
echo "starting to pull into $(pwd)"
|
clone_repo_with_retry cimp_$CLIENT_NAME
|
||||||
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/shared_resources_k8s.git -b main
|
clone_repo_with_retry shared_resources_k8s
|
||||||
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/cimp_$CLIENT_NAME.git -b main
|
clone_repo_with_retry common_sysadmin
|
||||||
git clone git@git.service.wiseadvice.eu:wiseadvice_apps/common_sysadmin.git -b main
|
|
||||||
|
|
||||||
ln -sf $WA_REPO/common_sysadmin/k8s $HOME/kubeconfs_common
|
ln -sf $WA_REPO/common_sysadmin/k8s $HOME/kubeconfs_common
|
||||||
ln -sf $WA_REPO/shared_resources_k8s/k8s $HOME/kubeconfs_common
|
ln -sf $WA_REPO/shared_resources_k8s/k8s $HOME/kubeconfs_common
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue