introduce job version of "prepare-pipelines.yml" (#2446)
Co-authored-by: Konrad Jamrozik <kojamroz@microsoft.com>
This commit is contained in:
Родитель
e8f105e711
Коммит
6a6b6d0647
|
@ -0,0 +1,192 @@
|
|||
parameters:
|
||||
- name: Repository
|
||||
type: string
|
||||
default: $(Build.Repository.Name)
|
||||
- name: Prefix
|
||||
type: string
|
||||
- name: CIConventionOptions
|
||||
type: string
|
||||
default: ''
|
||||
- name: UPConventionOptions
|
||||
type: string
|
||||
default: ''
|
||||
- name: TestsConventionOptions
|
||||
type: string
|
||||
default: ''
|
||||
- name: GenerateUnifiedWeekly
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
- job: PreparePipelines
|
||||
pool:
|
||||
name: azsdk-pool-mms-ubuntu-2004-general
|
||||
vmImage: MMSUbuntu20.04
|
||||
steps:
|
||||
- template: install-pipeline-generation.yml
|
||||
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
|
||||
# This covers our public repos.
|
||||
- ${{ if not(endsWith(parameters.Repository, '-pr'))}}:
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project public
|
||||
--prefix ${{parameters.Prefix}}
|
||||
--devopspath "\${{parameters.Prefix}}"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention ci
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
${{parameters.CIConventionOptions}}
|
||||
displayName: Create CI Pipelines for Public Repository
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project internal
|
||||
--prefix ${{parameters.Prefix}}
|
||||
--devopspath "\${{parameters.Prefix}}"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention up
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
${{parameters.UPConventionOptions}}
|
||||
displayName: Create UP Pipelines for Public Repository
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project internal
|
||||
--prefix ${{parameters.Prefix}}
|
||||
--devopspath "\${{parameters.Prefix}}"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention tests
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
${{parameters.TestsConventionOptions}}
|
||||
displayName: Create Live Test Pipelines for Public Repository
|
||||
condition: and(succeeded(), ne('${{parameters.TestsConventionOptions}}',''))
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project internal
|
||||
--prefix ${{parameters.Prefix}}
|
||||
--devopspath "\${{parameters.Prefix}}"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention testsweekly
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
${{parameters.TestsConventionOptions}}
|
||||
displayName: Create Weekly (Multi-Cloud) Live Test Pipelines for Public Repository
|
||||
condition: and(succeeded(), ne('${{parameters.TestsConventionOptions}}',''))
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project internal
|
||||
--prefix ${{parameters.Prefix}}
|
||||
--devopspath "\${{parameters.Prefix}}"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention upweekly
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
${{parameters.UPConventionOptions}}
|
||||
displayName: Create Weekly (Multi-Cloud) Unified Test Pipelines for Public Repository
|
||||
condition: and(succeeded(), eq(${{parameters.GenerateUnifiedWeekly}},true))
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
||||
|
||||
|
||||
# This covers our -pr repositories.
|
||||
- ${{ if endsWith(parameters.Repository, '-pr')}}:
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project internal
|
||||
--prefix ${{parameters.Prefix}}-pr
|
||||
--devopspath "\${{parameters.Prefix}}\pr"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention ci
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
--no-schedule
|
||||
${{parameters.CIConventionOptions}}
|
||||
displayName: Create CI Pipelines for Private Repository
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project internal
|
||||
--prefix ${{parameters.Prefix}}-pr
|
||||
--devopspath "\${{parameters.Prefix}}\pr"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention up
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
--no-schedule
|
||||
${{parameters.UPConventionOptions}}
|
||||
displayName: Create UP Pipelines for Private Repository
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
||||
- script: >
|
||||
$(Pipeline.Workspace)/pipeline-generator/pipeline-generator
|
||||
--organization https://dev.azure.com/azure-sdk
|
||||
--project internal
|
||||
--prefix ${{parameters.Prefix}}-pr
|
||||
--devopspath "\${{parameters.Prefix}}\pr"
|
||||
--path $(System.DefaultWorkingDirectory)/sdk
|
||||
--endpoint Azure
|
||||
--repository ${{parameters.Repository}}
|
||||
--convention tests
|
||||
--agentpool Hosted
|
||||
--branch refs/heads/$(DefaultBranch)
|
||||
--patvar PATVAR
|
||||
--set-managed-variables
|
||||
--debug
|
||||
--no-schedule
|
||||
${{parameters.TestsConventionOptions}}
|
||||
displayName: Create Live Test Pipelines for Private Repository
|
||||
condition: and(succeeded(), ne('${{parameters.TestsConventionOptions}}',''))
|
||||
env:
|
||||
PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat)
|
|
@ -1,3 +1,8 @@
|
|||
# As of 12/9/2022 this file is going to become obsolete and then deleted soon,
|
||||
# superseded by ../jobs/prepare-pipelines.yml, which includes all of the
|
||||
# logic in this file.
|
||||
# For more, please see: https://github.com/Azure/azure-sdk-tools/issues/4888
|
||||
|
||||
parameters:
|
||||
- name: Repository
|
||||
type: string
|
||||
|
|
Загрузка…
Ссылка в новой задаче