Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review changes from scripts-dev to scripts-adopter #2025

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions velero/backup/common-service/label-common-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ CM_SOURCE_NS="openshift-marketplace"
LIS_SOURCE_NS="openshift-marketplace"
LSR_SOURCE_NS="openshift-marketplace"

# Additional CatalogSources
ADDITIONAL_SOURCES=""

# default values no change
Expand All @@ -41,12 +42,9 @@ BASE_DIR=$(cd $(dirname "$0")/$(dirname "$(readlink $0)") && pwd -P)

# ---------- Main functions ----------

. ${BASE_DIR}/../../../cp3pt0-deployment/common/utils.sh

source ${BASE_DIR}/env.properties

function main() {

pre_req
label_catalogsource
label_ns_and_related
Expand Down Expand Up @@ -193,6 +191,33 @@ function label_cs(){
echo ""
}

# ---------- Info functions ----------#

function msg() {
printf '%b\n' "$1"
}

function success() {
msg "\33[32m[✔] ${1}\33[0m"
}

function error() {
msg "\33[31m[✘] ${1}\33[0m"
exit 1
}

function title() {
msg "\33[34m# ${1}\33[0m"
}

function info() {
msg "[INFO] ${1}"
}

function warning() {
msg "\33[33m[✗] ${1}\33[0m"
}

main $*

# ---------------- finish ----------------
Loading