Skip to content

Commit d22bed9

Browse files
committed
analyse 5
1 parent 032c0cd commit d22bed9

File tree

4 files changed

+47
-11
lines changed

4 files changed

+47
-11
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
param (
2+
[string]$MatrixKey,
3+
[string]$RepoRoot
4+
)
5+
6+
Write-Host "Matrix Key in script: $(MatrixKey)"
7+
Write-Host "Matrix RepoRoot in script: $(RepoRoot)"

.azure-pipelines/PipelineSteps/BatchGeneration/batch-generate-modules.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ param (
33
[string]$RepoRoot
44
)
55

6-
Write-Host "Matrix Key: $MatrixKey"
7-
86
$generateTargetsOutputFile = Join-Path $RepoRoot "artifacts" "generateTargets.json"
97
$generateTargets = Get-Content -Path $generateTargetsOutPutFile -Raw | ConvertFrom-Json
108
$moduleGroup = $generateTargets.$MatrixKey
9+
Write-Host "##[group]Generating module group $MatrixKey"
10+
foreach ($key in $moduleGroup.PSObject.Properties.Name | Sort-Object) {
11+
$values = $moduleGroup.$key -join ', '
12+
Write-Output "$key : $values"
13+
}
14+
Write-Host "##[endgroup]"
15+
Write-Host
1116
$sortedModuleNames = $moduleGroup.PSObject.Properties.Name | Sort-Object
1217

1318
$AutorestOutputDir = Join-Path $RepoRoot "artifacts" "autorest"

.azure-pipelines/PipelineSteps/BatchGeneration/build-modules.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ param (
33
[string]$RepoRoot
44
)
55

6-
Write-Host "Matrix Key: $MatrixKey"
6+
$utilFilePath = Join-Path $RepoRoot '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'util.psm1'
7+
Import-Module $utilFilePath -Force
78

89
$buildTargetsOutputFile = Join-Path $RepoRoot "artifacts" "buildTargets.json"
910
$buildTargets = Get-Content -Path $buildTargetsOutputFile -Raw | ConvertFrom-Json
1011
$moduleGroup = $buildTargets.$MatrixKey
12+
Write-Host "##[group]Building module group $MatrixKey"
13+
$moduleGroup | ForEach-Object { Write-Output $_ }
14+
Write-Host "##[endgroup]"
15+
Write-Host
1116
$buildModulesPath = Join-Path $RepoRoot 'tools' 'BuildScripts' 'BuildModules.ps1'
1217

1318
$results = @()

.azure-pipelines/batch-generation.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ variables:
44
BuildTimeoutInMinutes: 120
55
AnalysisTimeoutInMinutes: 120
66
TestTimeoutInMinutes: 180
7-
MaxParallelGenerateJobs: 3
7+
MaxParallelGenerateJobs: 15
88
MaxParallelBuildJobs: 15
9-
MaxParallelAnalyzeJobs: 4
10-
MaxParallelTestWindowsJobs: 1
11-
MaxParallelTestLinuxJobs: 2
12-
MaxParallelTestMacJobs: 3
9+
MaxParallelAnalyzeJobs: 5
10+
MaxParallelTestWindowsJobs: 5
11+
MaxParallelTestLinuxJobs: 5
12+
MaxParallelTestMacJobs: 5
1313
WindowsAgentPoolName: pool-windows-2019
1414
LinuxAgentPoolName: pool-ubuntu-2004
1515
MacOSAgentPoolName: 'Azure Pipelines'
@@ -29,6 +29,8 @@ stages:
2929

3030
# TODO: (Bernard) Uncomment the no checkout step after automatically install repo into agnets
3131
# - checkout: none
32+
- checkout: self
33+
fetchDepth: 1
3234

3335
- template: util/get-github-pat-steps.yml
3436

@@ -188,7 +190,8 @@ stages:
188190

189191
steps:
190192
- checkout: self
191-
persistCredentials: true
193+
fetchDepth: 1
194+
# persistCredentials: true
192195
fetchTags: false
193196

194197
- task: DownloadPipelineArtifact@2
@@ -234,6 +237,11 @@ stages:
234237
patterns: '**/debug/**'
235238
displayName: 'Download build artifacts'
236239

240+
- task: DownloadPipelineArtifact@2
241+
inputs:
242+
artifactName: 'filter'
243+
targetPath: artifacts
244+
237245
- task: PowerShell@2
238246
name: collect
239247
displayName: 'Collect modules artifacts'
@@ -289,8 +297,10 @@ stages:
289297
maxParallel: ${{ variables.MaxParallelAnalyzeJobs }}
290298

291299
steps:
292-
293-
- checkout: none
300+
- checkout: self
301+
fetchDepth: 1
302+
sparseCheckoutDirectories: tools/ .azure-pipelines/
303+
fetchTags: false
294304

295305
- task: DownloadPipelineArtifact@2
296306
inputs:
@@ -307,6 +317,15 @@ stages:
307317
script: |
308318
Write-Host "Matrix Key: $(MatrixKey)"
309319
320+
Write-Host "Top-level contents of $(Build.SourcesDirectory):"
321+
Get-ChildItem -Path "$(Build.SourcesDirectory)" | ForEach-Object {
322+
Write-Host $_.FullName
323+
}
324+
325+
$analyseModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'analyse-modules.ps1'
326+
& $buildModulesPath -MatrixKey "$(MatrixKey)" -RepoRoot "$(Build.SourcesDirectory)"
327+
328+
310329
- task: PublishPipelineArtifact@1
311330
displayName: 'Save Analyse Report'
312331
inputs:

0 commit comments

Comments
 (0)