Initial commit.
This commit is contained in:
commit
38c0b98fa8
8 changed files with 199 additions and 0 deletions
33
bin/argocd-bootstrap.sh
Executable file
33
bin/argocd-bootstrap.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# VARIABLES
|
||||
# Relative PATH to the workdir from the script directory
|
||||
WORK_DIR_RELPATH=".."
|
||||
|
||||
# Compute WORKDIR
|
||||
SCRIPT="$(readlink -f "$0")"
|
||||
SCRIPT_DIR="$(dirname "$SCRIPT")"
|
||||
WORK_DIR="$(readlink -f "$SCRIPT_DIR/$WORK_DIR_RELPATH")"
|
||||
|
||||
# Update the PATH to add the arkade bin directory
|
||||
# Add the arkade binary directory to the path if missing
|
||||
case ":${PATH}:" in
|
||||
*:"${HOME}/.arkade/bin":*) ;;
|
||||
*) export PATH="${PATH}:${HOME}/.arkade/bin" ;;
|
||||
esac
|
||||
|
||||
# Go to the working directory
|
||||
cd "$WORK_DIR" || exit 1
|
||||
|
||||
# Set GIT variables
|
||||
if [ -z "$GIT_REPO" ]; then
|
||||
export GIT_REPO="https://forgejo.mixinet.net/blogops/argocd.git"
|
||||
fi
|
||||
if [ -z "$GIT_TOKEN" ]; then
|
||||
GIT_TOKEN="$(pass mixinet.net/argocd@forgejo/repository-write)"
|
||||
export GIT_TOKEN
|
||||
fi
|
||||
|
||||
argocd-autopilot repo bootstrap --provider gitea
|
Loading…
Add table
Add a link
Reference in a new issue