Skip to content

Commit

Permalink
exporting the NS name to the post hook
Browse files Browse the repository at this point in the history
  • Loading branch information
rlinstorres committed Jul 28, 2023
1 parent 2c2ee7f commit 70ce96e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/deploy/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ updated_at=$(date +%s)
export_variables() {
# Export normally here so they are available to the post hook
export URL=$url
export NAMESPACE=$namespace
}

print_preinstall_message() {
Expand Down
6 changes: 6 additions & 0 deletions src/job/job
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ overlay_target_dir=$JOB_OVERLAY_TARGET_DIR

updated_at=$(date +%s)

export_variables() {
# Export normally here so they are available to the post hook
# export VARIABLE_NAME=$variable_name
}

print_preinstall_message() {
if [ "$JOB_MESSAGE" != "" ]; then
printf "%s\n" "$JOB_MESSAGE" "$JOB_LOG_URL$namespace"
Expand Down Expand Up @@ -107,6 +112,7 @@ install_resources () {
kustomize build | kubectl apply -f - -n "$namespace" --wait=true
}

export_variables
print_preinstall_message
config_context
install_resources
Expand Down

0 comments on commit 70ce96e

Please sign in to comment.