File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 6262 env :
6363 ACCOUNT_NAME : ${{ vars.ACCOUNT_NAME }}
6464 run : |
65- make truststore-pull-all -for-account ACCOUNT=${ACCOUNT_NAME}
65+ make truststore-pull-server -for-account ACCOUNT=${ACCOUNT_NAME}
6666
6767 - name : Terraform Init
6868 env :
@@ -124,7 +124,7 @@ jobs:
124124 env :
125125 ACCOUNT_NAME : ${{ vars.ACCOUNT_NAME }}
126126 run : |
127- make truststore-pull-all -for-account ACCOUNT=${ACCOUNT_NAME}
127+ make truststore-pull-server -for-account ACCOUNT=${ACCOUNT_NAME}
128128
129129 - name : Terraform Init
130130 env :
Original file line number Diff line number Diff line change @@ -202,8 +202,8 @@ truststore-build-ca: check-warn ## Build a CA (Certificate Authority)
202202truststore-build-cert : check-warn # # Build a certificate
203203 @./scripts/truststore.sh build-cert " $( CA_NAME) " " $( CERT_NAME) " " $( CERT_SUBJECT) "
204204
205- truststore-pull-all -for-account : check-warn # # Pull all certificates for each environment in a given account
206- @./scripts/truststore.sh pull-all -for-account " $( ACCOUNT) "
205+ truststore-pull-server -for-account : check-warn # # Pull all certificates for each environment in a given account
206+ @./scripts/truststore.sh pull-server -for-account " $( ACCOUNT) "
207207
208208truststore-pull-all : check-warn # # Pull all certificates
209209 @./scripts/truststore.sh pull-all " $( ENV) "
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ function _truststore_help() {
2525 echo " pull-ca-key <ca> - Pull the certificate authority private key"
2626 echo " pull-client <env> - pull the files needed for a client connection"
2727 echo " pull-server <env> - pull the files needed for a server connection"
28+ echo " pull-all-for-account <acc> - pull all the truststore files for all environments in a given account"
2829 echo " pull-all <env> - pull all the truststore files for an environment"
2930 echo " push-all <env> - push all the truststore files for an environment"
3031 echo " rotate-ca <env> - rotate the certificate authority, archiving the previous one"
@@ -321,10 +322,14 @@ function _truststore_pull_all_for_account() {
321322 echo " Pulling certs for environments ${envs_array[@]} in ${account} account"
322323
323324 for env in ${envs_array[@]} ; do
324- echo " ⏳ Pulling ${env} truststore certs"
325- _truststore_pull_ca $env
326- _truststore_pull_client $env
327- _truststore_pull_server $env
325+ # don't need to pull dev-sandbox etc certs
326+ if [[ $env == * " -sandbox" ]];
327+ then
328+ echo " ⏳ Pulling ${env} truststore certs"
329+ _truststore_pull_ca $env
330+ _truststore_pull_client $env
331+ _truststore_pull_server $env
332+ fi
328333 done
329334
330335 echo -e " ✅ Successfully pulled all ${account} truststore files from s3://${BUCKET} "
You can’t perform that action at this time.
0 commit comments