Skip to content

Commit 25c8d58

Browse files
fix: Update scripts to use AzureCliCredential and change shell commands to bash
1 parent 0eed28b commit 25c8d58

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

azure.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ hooks:
1515
continueOnError: false
1616
posix:
1717
shell: sh
18-
run: sh ./scripts/set_conns_env_vars.sh
18+
run: bash ./scripts/set_conns_env_vars.sh
1919
interactive: true
2020
continueOnError: false
2121
preprovision:
2222
posix:
2323
shell: sh
24-
run: sh ./scripts/auth_init.sh
24+
run: bash ./scripts/auth_init.sh
2525
interactive: true
2626
continueOnError: false
2727
windows:
@@ -32,7 +32,7 @@ hooks:
3232
postprovision:
3333
posix:
3434
shell: sh
35-
run: sh ./scripts/postprovision.sh
35+
run: bash ./scripts/postprovision.sh
3636
interactive: true
3737
continueOnError: false
3838
windows:

scripts/auth_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
import subprocess
33

4-
from azure.identity import AzureDeveloperCliCredential, DefaultAzureCredential
4+
from azure.identity import AzureDeveloperCliCredential, DefaultAzureCredential, AzureCliCredential
55
import urllib3
66

77
def get_auth_headers(credential):
@@ -73,7 +73,7 @@ def update_azd_env(name, val):
7373
)
7474
args = parser.parse_args()
7575

76-
credential = DefaultAzureCredential() # AzureDeveloperCliCredential()
76+
credential = AzureCliCredential() # DefaultAzureCredential() # AzureDeveloperCliCredential()
7777

7878
if args.appid and args.appid != "no-id":
7979
print(f"Checking if application {args.appid} exists")

scripts/auth_update.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import argparse
22

3-
from azure.identity import DefaultAzureCredential, AzureDeveloperCliCredential
3+
from azure.identity import DefaultAzureCredential, AzureDeveloperCliCredential, AzureCliCredential
44
import urllib3
55

66

@@ -24,6 +24,7 @@ def update_redirect_uris(credential, app_id, uri):
2424
}
2525
}
2626
},
27+
timeout=30,
2728
)
2829

2930

@@ -44,7 +45,7 @@ def update_redirect_uris(credential, app_id, uri):
4445
)
4546
args = parser.parse_args()
4647

47-
credential = DefaultAzureCredential()
48+
credential = AzureCliCredential()
4849

4950
print(
5051
f"Updating application registration {args.appid} with redirect URI for {args.uri}"

scripts/postprovision.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ -z "$virtualMachineId" ]; then
1919
echo "1. Open the terminal."
2020
echo "2. Navigate to the scripts directory: cd $SCRIPT_DIR/scripts"
2121
echo "3. Run the following command to process the sample data:"
22-
echo "sh ./process_sample_data.sh '$AZURE_SEARCH_ENDPOINT' '$AZURE_AI_AGENT_ENDPOINT' '$EMBEDDING_MODEL_NAME' '2025-01-01-preview'"
22+
echo "bash ./process_sample_data.sh '$AZURE_SEARCH_ENDPOINT' '$AZURE_AI_AGENT_ENDPOINT' '$EMBEDDING_MODEL_NAME' '2025-01-01-preview'"
2323
else
2424
echo "To ingest the sample data, follow these steps:"
2525
echo "1. Login to the Virtual Machine using the username '$userName' and Password provided during deployment."

0 commit comments

Comments
 (0)