Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
cluster.sh tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jadarsie committed Feb 2, 2021
1 parent 31c1029 commit 8f305b7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/e2e/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@ function rotateCertificates {
# Retry if it fails the first time (validate --certificate-profile instead of regenerating a new set of certs)
exit_code=$?
if [ $exit_code -ne 0 ]; then
local CERTS_PATH=_output/${RESOURCE_GROUP}/certificateProfile.json
jq '.properties.certificateProfile' _output/${RESOURCE_GROUP}/_rotate_certs_output/apimodel.json > ${CERTS_PATH}
docker run --rm \
-v $(pwd):${WORK_DIR} \
-w ${WORK_DIR} \
-e RESOURCE_GROUP=$RESOURCE_GROUP \
${DEV_IMAGE} \
/bin/bash -c "jq '.properties.certificateProfile' _output/${RESOURCE_GROUP}/_rotate_certs_output/apimodel.json > _output/${RESOURCE_GROUP}/certificateProfile.json" || exit 1

docker run --rm \
-v $(pwd):${WORK_DIR} \
Expand All @@ -104,7 +108,7 @@ function rotateCertificates {
--client-id ${AZURE_CLIENT_ID} \
--client-secret ${AZURE_CLIENT_SECRET} \
--subscription-id ${AZURE_SUBSCRIPTION_ID} \
--certificate-profile ${CERTS_PATH} --force \
--certificate-profile _output/${RESOURCE_GROUP}/certificateProfile.json --force \
--debug

exit $?
Expand Down

0 comments on commit 8f305b7

Please sign in to comment.