-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from microsoft/libtemplateUpdate
Merge latest Library.Template
- Loading branch information
Showing
10 changed files
with
60 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
parameters: | ||
- name: deadPATServiceConnectionId # The GUID of the PAT-based service connection whose access token must be replaced. | ||
type: string | ||
- name: wifServiceConnectionName # The name of the WIF service connection to use to get the access token. | ||
type: string | ||
- name: resource # The scope for which the access token is requested. | ||
type: string | ||
default: 499b84ac-1321-427f-aa17-267ca6975798 # Azure Artifact feeds (any of them) | ||
|
||
steps: | ||
- task: AzureCLI@2 | ||
displayName: 🔏 Authenticate with WIF service connection | ||
inputs: | ||
azureSubscription: ${{ parameters.wifServiceConnectionName }} | ||
scriptType: pscore | ||
scriptLocation: inlineScript | ||
inlineScript: | | ||
$accessToken = az account get-access-token --query accessToken --resource '${{ parameters.resource }}' -o tsv | ||
# Set the access token as a secret, so it doesn't get leaked in the logs | ||
Write-Host "##vso[task.setsecret]$accessToken" | ||
# Override the apitoken of the nuget service connection, for the duration of this stage | ||
Write-Host "##vso[task.setendpoint id=${{ parameters.deadPATServiceConnectionId }};field=authParameter;key=apitoken]$accessToken" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters