Merge branch 'feat/mvk-gcloud-template' of ssh://codeberg.org/headshed/infctl-cli into feat/mvk-gcloud-template
This commit is contained in:
commit
a8f25e733c
1 changed files with 0 additions and 29 deletions
|
|
@ -103,32 +103,3 @@ if [[ ! -d "$INFCTL_INSTALL_DIR" ]]; then
|
||||||
chown -R user:user "$INFCTL_INSTALL_DIR"
|
chown -R user:user "$INFCTL_INSTALL_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in {1..100}; do
|
|
||||||
if [[ -f /opt/src/infctl-cli/.env ]]; then
|
|
||||||
echo ".env file found."
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo ".env file not found. Attempt $i/100. Waiting 5 seconds..."
|
|
||||||
sleep 5
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Final check after loop
|
|
||||||
if [[ ! -f /opt/src/infctl-cli/.env ]]; then
|
|
||||||
echo "ERROR: .env file not found after 10 attempts. Exiting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# load .env file
|
|
||||||
source /opt/src/infctl-cli/.env
|
|
||||||
cd $INFCTL_INSTALL_DIR/infctl-cli || "echo 'Failed to change directory to $INFCTL_INSTALL_DIR/infctl-cli' ; exit 1"
|
|
||||||
|
|
||||||
# check to see if INSTALL_FORGEJO is set to "true"
|
|
||||||
if [[ "$INSTALL_FORGEJO" == "true" ]]; then
|
|
||||||
# install forgejo using infctl
|
|
||||||
# ....
|
|
||||||
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
|
||||||
LOG_FORMAT=none infctl -f "${INFCTL_INSTALL_DIR}/infctl-cli/gcloud/tf/scripts/install-forgejo-pipeline.json"
|
|
||||||
touch /etc/forgejo_was_installed
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue