Skip to content

Commit

Permalink
Merge pull request #16 from malscent/main
Browse files Browse the repository at this point in the history
Updated to success notification
  • Loading branch information
malscent authored Mar 10, 2021
2 parents 1beac52 + c2b328c commit cc42250
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion installers/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function __install_prerequisites() {

#There are some "startup" functions that need run for GCP script
if [[ "$env" == "GCP" ]]; then
echo "Running GCP Prequisites"
__log_debug "Running GCP Prequisites"
ACCESS_TOKEN=$(__get_gcp_metadata_value "instance/service-accounts/default/token" | jq -r '.access_token')
__log_debug "GCP Access Token: $ACCESS_TOKEN"
PROJECT_ID=$(__get_gcp_metadata_value "project/project-id")
Expand Down Expand Up @@ -531,6 +531,17 @@ function __install_couchbase() {
function __post_install_finalization() {
__log_debug "Beginning Post Install Finalization"
local env=$1
ACCESS_TOKEN=$(__get_gcp_metadata_value "instance/service-accounts/default/token" | jq -r '.access_token')
__log_debug "GCP Access Token: $ACCESS_TOKEN"
PROJECT_ID=$(__get_gcp_metadata_value "project/project-id")
__log_debug "GCP Project Id: $PROJECT_ID"
CONFIG=$(__get_gcp_attribute_value "runtime-config-name")
__log_debug "GCP Config: $CONFIG"
SUCCESS_STATUS_PATH="$(__get_gcp_attribute_value "status-success-base-path")/$(hostname)"
__log_debug "GCP Success Status Path: $SUCCESS_STATUS_PATH"
FAILURE_STATUS_PATH="$(__get_gcp_attribute_value "status-failure-base-path")/$(hostname)"
__log_debug "GCP Failure Status Path: $FAILURE_STATUS_PATH"

if [[ "$env" == "GCP" ]]; then
host=$(hostname)
SUCCESS_PAYLOAD="$(printf '{"name": "%s", "text": "%s"}' \
Expand Down

0 comments on commit cc42250

Please sign in to comment.