File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -319,6 +319,16 @@ Next, create the Dockerfile.
319319 # Load a token either from the environment variable or by using the service principal credentials.
320320 load_azp_token () {
321321 if [ -n " $AZP_CLIENTID " ]; then
322+ if [ -z " $AZP_CLIENTSECRET " ]; then
323+ echo 1>&2 " error: AZP_CLIENTSECRET must be set when AZP_CLIENTID is used"
324+ exit 1
325+ fi
326+
327+ if [ -z " $AZP_TENANTID " ]; then
328+ echo 1>&2 " error: AZP_TENANTID must be set when AZP_CLIENTID is used"
329+ exit 1
330+ fi
331+
322332 echo " Using service principal credentials to get token"
323333 az login --allow-no-subscriptions --service-principal --username " $AZP_CLIENTID " --password " $AZP_CLIENTSECRET " --tenant " $AZP_TENANTID "
324334 # adapted from https://learn.microsoft.com/en-us/azure/databricks/dev-tools/user-aad-token
You can’t perform that action at this time.
0 commit comments