Skip to content

Commit 43d7f6e

Browse files
authored
Merge pull request #512 from CecileRobertMichon/prow-conformance-creds
Add step to parse prow credentials in create cluster script
2 parents 1161dc8 + 3f7afdc commit 43d7f6e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hack/create-dev-cluster.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ set -o errexit
1717
set -o nounset
1818
set -o pipefail
1919

20+
# for Prow we use the provided AZURE_CREDENTIALS file
21+
if [[ -n "${AZURE_CREDENTIALS}" ]]; then
22+
export AZURE_SUBSCRIPTION_ID="$(cat ${AZURE_CREDENTIALS} | grep SubscriptionID | cut -d '=' -f 2)"
23+
export AZURE_TENANT_ID="$(cat ${AZURE_CREDENTIALS} | grep TenantID | cut -d '=' -f 2)"
24+
export AZURE_CLIENT_ID="$(cat ${AZURE_CREDENTIALS} | grep ClientID | cut -d '=' -f 2)"
25+
# password might contain an '=' sign so we need to get all the fields after the first '='
26+
export AZURE_CLIENT_SECRET="$(cat ${AZURE_CREDENTIALS} | grep ClientSecret | cut -d '=' -f 2-)"
27+
fi
28+
2029
# Verify the required Environment Variables are present.
2130
: "${AZURE_SUBSCRIPTION_ID:?Environment variable empty or not defined.}"
2231
: "${AZURE_TENANT_ID:?Environment variable empty or not defined.}"

0 commit comments

Comments
 (0)