Fix orderbooks deploy bootstrap registry auth
All checks were successful
deploy / deploy (push) Successful in 16s
All checks were successful
deploy / deploy (push) Successful in 16s
This commit is contained in:
parent
284e465588
commit
e86de1b6a9
1 changed files with 8 additions and 3 deletions
|
|
@ -96,13 +96,18 @@ if [[ -z "${FORGEJO_TOKEN:-}" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${REGISTRY_HOST:-}" ]]; then
|
if [[ -z "${REGISTRY_HOST:-}" ]]; then
|
||||||
if [[ -n "${REGISTRY_DOMAIN:-}" ]]; then
|
if [[ -n "${REGISTRY_DOMAIN:-}" && "${REGISTRY_DOMAIN}" != *'${'* ]]; then
|
||||||
REGISTRY_HOST="$REGISTRY_DOMAIN"
|
REGISTRY_HOST="$REGISTRY_DOMAIN"
|
||||||
else
|
else
|
||||||
echo "missing registry host" >&2
|
REGISTRY_HOST="registry.doran.133011.xyz"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
shared_registry_user="$(kubectl -n registry get secret registry-secrets -o jsonpath='{.data.htpasswd}' 2>/dev/null | base64 -d 2>/dev/null | cut -d: -f1 || true)"
|
||||||
|
if [[ -n "$shared_registry_user" ]]; then
|
||||||
|
REGISTRY_USERNAME="$shared_registry_user"
|
||||||
|
fi
|
||||||
|
|
||||||
: "${REGISTRY_USERNAME:?missing registry username}"
|
: "${REGISTRY_USERNAME:?missing registry username}"
|
||||||
: "${REGISTRY_PASSWORD:?missing registry password}"
|
: "${REGISTRY_PASSWORD:?missing registry password}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue