Skip to content

Commit

Permalink
Force using aad auth for storage upload (#4458)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin committed Sep 16, 2024
1 parent a336c93 commit 66e847c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eng/tsp-core/pipelines/pr-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extends:
scriptLocation: inlineScript
inlineScript: |
az storage blob upload-batch \
--auth-mode login \
--destination \$web \
--account-name "cadlplayground" \
--destination-path $(TYPESPEC_WEBSITE_BASE_PATH) \
Expand All @@ -56,6 +57,7 @@ extends:
scriptLocation: inlineScript
inlineScript: |
az storage blob upload-batch \
--auth-mode login \
--destination \$web \
--account-name "tspwebsitepr" \
--destination-path $(TYPESPEC_WEBSITE_BASE_PATH) \
Expand Down
1 change: 1 addition & 0 deletions eng/tsp-core/pipelines/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ extends:
scriptLocation: inlineScript
inlineScript: |
az storage blob upload-batch ^
--auth-mode login ^
--destination $web ^
--account-name "cadlplayground" ^
--destination-path / ^
Expand Down
3 changes: 3 additions & 0 deletions eng/tsp-core/scripts/create-tryit-comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,8 @@ async function request(method: string, url: string, data: any): Promise<string>
body: data.body,
});

if (!response.ok) {
throw new Error(`Request failed: ${response.statusText}\n\n` + (await response.text()));
}
return response.text();
}

0 comments on commit 66e847c

Please sign in to comment.