Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new generation tool that supports service connections #9466

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions eng/common/pipelines/templates/jobs/prepare-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ jobs:
Prefix: 'na'
DevOpsPath: 'na'
InternalVariableGroups: ''
InternalServiceConnections: ''
GeneratePublicCIPipeline: ''
GenerateUnifiedWeekly: ''
TestVariableGroups: ''
TestServiceConnections: ''

# Standard set of variable groups for the Azure SDK repositories
AzureSDK_Maven_Release_Pipeline_Secrets: 1
Expand Down Expand Up @@ -70,6 +73,12 @@ jobs:
exit 1
}

$generatePublicCIPipeline = 'true'
$generateUnifiedWeekly = 'false'

$testServiceConnections = '"Azure" "azure-sdk-tests" "azure-sdk-tests-china" "azure-sdk-tests-preview" "azure-sdk-tests-public" "azure-sdk-tests-usgov" "Azure SDK Test Resources - LiveTestSecrets"'
$internalServiceConnections = '"Azure" "Azure SDK Artifacts" "Azure SDK Engineering System" "opensource-api-connection" "AzureSDKEngKeyVault Secrets"'

# Map the language prefix to the appropriate variable groups
switch ($prefix)
{
Expand All @@ -81,16 +90,19 @@ jobs:
$internalVariableGroups = '$(AzureSDK_Maven_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'
}
"js" {
$generatePublicCIPipeline = 'false'
weshaggard marked this conversation as resolved.
Show resolved Hide resolved
$internalVariableGroups = '$(NPM_Registry_Authentication) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'
$testVariableGroups = '$(Secrets_for_Resource_Provisioner)'
}
"python" {
$generatePublicCIPipeline = 'false'
$internalVariableGroups = '$(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'
$testVariableGroups = '$(Secrets_for_Resource_Provisioner)'
}
"net" {
$internalVariableGroups = '$(AzureSDK_Nuget_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'
$testVariableGroups = '$(Secrets_for_Resource_Provisioner)'
$internalServiceConnections += ' "Azure SDK Symbols Publishing" Nuget.org'
}
"cpp" {
$internalVariableGroups = '$(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations) $(Secrets_for_Resource_Provisioner)'
Expand All @@ -110,9 +122,16 @@ jobs:

Write-Host "InternalVariableGroups = $internalVariableGroups"
Write-Host "TestVariableGroups = $testVariableGroups"
Write-Host "TestServiceConnections = $testServiceConnections"
Write-Host "InternalServiceConnections = $internalServiceConnections"
Write-Host "GeneratePublicCIPipeline = $generatePublicCIPipeline"
Write-Host "GenerateUnifiedWeekly = $generateUnifiedWeekly"

Write-Host "##vso[task.setvariable variable=InternalVariableGroups]$internalVariableGroups"
Write-Host "##vso[task.setvariable variable=TestVariableGroups]$testVariableGroups"
Write-Host "##vso[task.setvariable variable=TestServiceConnections]$testServiceConnections"
Write-Host "##vso[task.setvariable variable=InternalServiceConnections]$internalServviceConnections"
Write-host "##vso[task.setvariable variable=GeneratePublicCIPipeline]$generatePublicCIPipeline"
Write-Host "##vso[task.setvariable variable=GenerateUnifiedWeekly]$generateUnifiedWeekly"
displayName: Setup pipeline generation variables

Expand All @@ -135,7 +154,9 @@ jobs:
--branch refs/heads/$(DefaultBranch)
--set-managed-variables
--debug
--serviceconnections "Azure"
displayName: 'Generate ci pipelines for: ${{ parameters.Repository }}'
condition: and(succeeded(), eq(variables['GeneratePublicCIPipeline'],'true'))
continueOnError: true
- task: AzureCLI@2
inputs:
Expand All @@ -157,6 +178,7 @@ jobs:
--set-managed-variables
--debug
--variablegroups $(InternalVariableGroups) $(TestVariableGroups)
--serviceconnections $(InternalServiceConnections) $(TestServiceConnections)
displayName: 'Generate release pipelines for: ${{ parameters.Repository }}'
continueOnError: true
- task: AzureCLI@2
Expand All @@ -179,6 +201,7 @@ jobs:
--set-managed-variables
--debug
--variablegroups $(TestVariableGroups)
--serviceconnections $(TestServiceConnections)
displayName: 'Generate test pipelines for: ${{ parameters.Repository }}'
condition: and(succeeded(), ne(variables['TestVariableGroups'],''))
continueOnError: true
Expand All @@ -202,6 +225,7 @@ jobs:
--set-managed-variables
--debug
--variablegroups $(TestVariableGroups)
--serviceconnections $(TestServiceConnections)
displayName: 'Generate weekly test pipelines (multi-cloud) for: ${{ parameters.Repository }}'
condition: and(succeeded(), ne(variables['TestVariableGroups'],''))
continueOnError: true
Expand All @@ -225,6 +249,7 @@ jobs:
--set-managed-variables
--debug
--variablegroups $(InternalVariableGroups) $(TestVariableGroups)
--serviceconnections $(InternalServiceConnections) $(TestServiceConnections)
displayName: 'Generate weekly unified test pipelines (multi-cloud) for: ${{ parameters.Repository }}'
condition: and(succeeded(), ne(variables['GenerateUnifiedWeekly'],''))
continueOnError: true
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ steps:
- script: >
dotnet tool install
Azure.Sdk.Tools.PipelineGenerator
--version 1.1.0-dev.20240604.1
--version 1.1.0-dev.20241204.1
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
--tool-path ${{parameters.ToolPath}}
workingDirectory: $(Pipeline.Workspace)/pipeline-generator
Expand Down
Loading