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

[patch] Print statements to check if DB backup feature is enabled in gitops #1428

Merged
merged 1 commit into from
Jan 6, 2025
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
12 changes: 12 additions & 0 deletions image/cli/mascli/functions/gitops_db2u_database
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,17 @@ DB2_WORKLOAD: '${DB2_WORKLOAD}'"
if [[ -n "$DB2_BACKUP_NOTIFY_SLACK_URL" && -n "$ICD_AUTH_KEY" ]]; then
TAGS="[{\"Key\": \"source\", \"Value\": \"gitops_db2u_database\"}, {\"Key\": \"account\", \"Value\": \"${ACCOUNT_ID}\"}, {\"Key\": \"cluster\", \"Value\": \"${CLUSTER_ID}\"}]"
sm_update_secret ${SECRET_NAME_ICD_AUTH_KEY} "{\"icd_auth_key\": \"${ICD_AUTH_KEY}\"}" "${TAGS}"
else
if [[ -z "$DB2_BACKUP_NOTIFY_SLACK_URL" ]]; then
echo
echo_h2 "Slack Url is not configured for DB2 backup"
fi
if [[ -z "$ICD_AUTH_KEY" ]]; then
echo
echo_h2 "ICD_AUTH_KEY is not available as environment properties in the apps pipeline"
fi
echo
echo_h2 "Hence optional feature - DB2 automated backup is not enabled"
fi

TEMP_DIR=$GITOPS_WORKING_DIR/tmp-db2u-database
Expand Down Expand Up @@ -616,6 +627,7 @@ DB2_WORKLOAD: '${DB2_WORKLOAD}'"
echo_h2 "Optional DB backup configurations are provided"
sm_verify_secret_exists $SECRET_NAME_ICD_AUTH_KEY "icd_auth_key"
sm_verify_secret_exists $SECRET_NAME_DB2_BACKUP "bucketName,accessKey,access_secret_key,endpointURL"
echo_h2 "Auto DB backup feature is enabled"
export BACKUP=true
fi

Expand Down
Loading