31 lines
679 B
Bash
Executable File
31 lines
679 B
Bash
Executable File
#!/bin/bash
|
|
# Info: postrun for oci-reg installation
|
|
# Author: JesusPerezLorenzo
|
|
# Release: 1.0.2
|
|
# Date: 15-01-2024
|
|
|
|
set +o errexit
|
|
set +o pipefail
|
|
|
|
SETTINGS_FILE=$1
|
|
SERVER_POS=$2
|
|
TASK_POS=$3
|
|
#SETTINGS_ROOT=$4
|
|
RUN_ROOT=$(dirname "$0")
|
|
#ORG=$(pwd)
|
|
|
|
[ -z "$SETTINGS_FILE" ] && [ -z "$SERVER_POS" ] && [ -z "$TASK_POS" ] && exit 0
|
|
|
|
YQ=$(type -P yq)
|
|
JQ=$(type -P jq)
|
|
[ -z "$YQ" ] && echo "yq not installed " && exit 1
|
|
[ -z "$JQ" ] && echo "jq not installed " && exit 1
|
|
|
|
[ -r "$RUN_ROOT/env-oci-reg" ] && . "$RUN_ROOT"/env-oci-reg
|
|
|
|
[ -z "$PROVISIONING" ] && echo "PROVISIONING not found in environment" && exit 1
|
|
|
|
. "$PROVISIONING"/core/lib/sops
|
|
|
|
#rm -f /tmp/oci-reg_config.json
|