|
1 | 1 | parameters:
|
2 | 2 | - name: TestChangedModulesOnly
|
3 |
| - type: string |
4 |
| - default: 'True' |
| 3 | + type: boolean |
| 4 | + default: true |
| 5 | +# Selected modules to generate, build, analyze and test |
5 | 6 | - name: SelectedTargetModules
|
6 | 7 | type: string
|
7 | 8 | default: 'None'
|
8 | 9 | - name: NotificationReceiversOverride
|
9 | 10 | type: string
|
10 | 11 | default: 'None'
|
| 12 | +# branch from when creating the generation branch |
11 | 13 | - name: GenerationBaseBranch
|
12 | 14 | type: string
|
13 | 15 | default: 'main'
|
| 16 | +- name: PrepareModulesOnGenerationBranch |
| 17 | + type: boolean |
| 18 | + default: false |
14 | 19 |
|
15 | 20 | variables:
|
16 | 21 | IntermediateStepTimeoutInMinutes: 30
|
@@ -61,6 +66,7 @@ stages:
|
61 | 66 | Write-Host "Parameter SelectedTargetModules: ${{ parameters.SelectedTargetModules }}"
|
62 | 67 | Write-Host "Parameter NotificationReceiversOverride: ${{ parameters.NotificationReceiversOverride }}"
|
63 | 68 | Write-Host "Parameter GenerationBaseBranch: ${{ parameters.GenerationBaseBranch }}"
|
| 69 | + Write-Host "Parameter PrepareModulesOnGenerationBranch: ${{ parameters.PrepareModulesOnGenerationBranch }}" |
64 | 70 |
|
65 | 71 | # TODO: (Bernard) Uncomment the no checkout step after automatically install repo into agents
|
66 | 72 | # - checkout: none
|
@@ -105,9 +111,11 @@ stages:
|
105 | 111 | targetType: inline
|
106 | 112 | pwsh: true
|
107 | 113 | script: |
|
108 |
| - Write-Host "Checkout to GenerationBranch: $(checkout.GenerationBranch)" |
109 |
| - git fetch origin "$(checkout.GenerationBranch)" |
110 |
| - git checkout "$(checkout.GenerationBranch)" |
| 114 | + if (${{ parameters.PrepareModulesOnGenerationBranch }} -eq 'true') { |
| 115 | + Write-Host "Checkout to GenerationBranch: $(checkout.GenerationBranch)" |
| 116 | + git fetch origin "$(checkout.GenerationBranch)" |
| 117 | + git checkout "$(checkout.GenerationBranch)" |
| 118 | + } |
111 | 119 |
|
112 | 120 | $prepareModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'prepare.ps1'
|
113 | 121 | & $prepareModulesPath -RepoRoot "$(Build.SourcesDirectory)" -MaxParallelJobs "${{ variables.MaxParallelGenerateJobs }}"
|
|
0 commit comments