@@ -50,17 +50,21 @@ jobs:
50
50
- ' !sdk/**/recordings/*'
51
51
- ' !sdk/**/SessionRecords/*'
52
52
- ' !sdk/**/session-records/*'
53
+ ${{ if endsWith(parameters.Repository, '-pr') }} :
54
+ TokenToUseForAuth : $(azuresdk-github-pat)
55
+
53
56
- template : /eng/common/pipelines/templates/steps/install-pipeline-generation.yml
54
57
- template : /eng/common/pipelines/templates/steps/set-default-branch.yml
55
58
56
59
- pwsh : |
57
60
Write-Host "Setting up pipeline variables"
58
- if ("${{ parameters.Repository }}" -match "Azure/azure-sdk-for-(?<prefix>[^-]*)(?<pr>-pr)?") {
59
- $prefix = $matches['prefix']
60
- $devOpsPath = "\$prefix"
61
+ if ("${{ parameters.Repository }}" -match "Azure/azure-sdk-for-(?<lang>[^-]*)(?<pr>-pr)?") {
62
+ $lang = $matches['lang']
63
+ $devOpsPath = "\$lang"
64
+ $prefix = $lang
61
65
if ($matches['pr']) {
62
66
$devOpsPath = "${devOpsPath}\pr"
63
- $prefix = "${prefix} -pr"
67
+ $prefix + = "-pr"
64
68
Write-Host "##vso[task.setvariable variable=ProjectForPRValidation]internal"
65
69
}
66
70
Write-Host "Prefix = $prefix"
79
83
$testServiceConnections = '"Azure" "azure-sdk-tests" "azure-sdk-tests-preview" "azure-sdk-tests-public" "Azure SDK Test Resources - LiveTestSecrets"'
80
84
$internalServiceConnections = '"Azure" "Azure SDK Artifacts" "Azure SDK Engineering System" "opensource-api-connection" "AzureSDKEngKeyVault Secrets"'
81
85
82
- # Map the language prefix to the appropriate variable groups
83
- switch ($prefix )
86
+ # Map the language to the appropriate variable groups
87
+ switch ($lang )
84
88
{
85
89
"java" {
86
90
$internalVariableGroups = '$(AzureSDK_Maven_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'
@@ -115,7 +119,7 @@ jobs:
115
119
$generateUnifiedWeekly = 'true'
116
120
}
117
121
default {
118
- Write-Error "Prefix '$prefix ' is not recognized."
122
+ Write-Error "Language '$lang ' is not recognized."
119
123
exit 1
120
124
}
121
125
}
0 commit comments