Skip to content

Commit

Permalink
Merge pull request #13 from holywen/dev
Browse files Browse the repository at this point in the history
improve base64 command line compatibility, print admin password in va…
  • Loading branch information
holywen authored Mar 20, 2024
2 parents 51071f0 + 291eb6b commit cc8935a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion blueprints/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ probes-common () {
probes-bp01 () {
local ROOT="01-getting-started"
eval "$(get-tf-output "$ROOT" kubeconfig_export)"
INITIAL_PASS=$(eval "$(get-tf-output "$ROOT" cbcd_initial_admin_password)"); \
INITIAL_PASS=$(eval "$(get-tf-output "$ROOT" cbcd_password)"); \
printf "$MSG_INFO" "Initial Admin Password: $INITIAL_PASS."
}

probes-bp02 () {
local ROOT="02-at-scale"
eval "$(get-tf-output "$ROOT" kubeconfig_export)"
INITIAL_PASS=$(eval "$(get-tf-output "$ROOT" cbcd_password)"); \
printf "$MSG_INFO" "Initial Admin Password: $INITIAL_PASS."
eval "$(get-tf-output "$ROOT" velero_backup_schedule_team_cd)" && eval "$(get-tf-output "$ROOT" velero_backup_on_demand_team_cd)" > "/tmp/backup.txt" && \
cat "/tmp/backup.txt" | grep "Backup completed with status: Completed" && \
printf "$MSG_INFO" "Velero backups are working"
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ output "cbcd_url" {

output "cbcd_password" {
description = "Command to get the admin password of Cloudbees CD"
value = "kubectl get secret --namespace ${local.namespace} cloudbees-cd-cloudbees-flow-credentials -o jsonpath='{.data.CBF_SERVER_ADMIN_PASSWORD}' | base64 --decode; echo"
value = "kubectl get secret --namespace ${local.namespace} cloudbees-cd-cloudbees-flow-credentials -o jsonpath='{.data.CBF_SERVER_ADMIN_PASSWORD}' | base64 -d; echo"
}

output "cbcd_domain_name" {
Expand Down

0 comments on commit cc8935a

Please sign in to comment.