@samitouri / QOSAMI-WSL / commits / 382b43cb

Add pipeline stage to produce DCAT submission files (#41236)

Flor Chacón committed Aug 7, 2026 at 11:09 UTC 382b43cb2e9fbd6408461dc53990d5fe7650999e
2 files changed +69
.pipelines/dcat-stage.yml new
+63
@@ -0,0 +1,63 @@
1 +stages:
2 + - stage: dcat_prepare
3 + displayName: Prepare DCAT submissions
4 + dependsOn:
5 + - build_x64
6 + - build_arm64
7 + jobs:
8 + - job: prepare
9 + displayName: Generate DCAT submission metadata
10 + pool:
11 + type: windows
12 + variables:
13 + ob_outputDirectory: '$(Pipeline.Workspace)\dcat-output'
14 + ob_artifactBaseName: drop_wsl
15 + ob_artifactSuffix: _dcat
16 + ob_sdl_checkcflags_enabled: false
17 + DcatContentPath: '$(Pipeline.Workspace)\dcat'
18 + buildStagePackageVersion: $[ stageDependencies.build_x64.build_x64.outputs['version.WSL_PACKAGE_VERSION'] ]
19 + steps:
20 + - checkout: releaseScripts
21 + path: s\wsl-release-scripts
22 +
23 + - task: DownloadPipelineArtifact@2
24 + displayName: Download x64 build artifact
25 + inputs:
26 + artifact: drop_wsl_build
27 + path: '$(Pipeline.Workspace)\drop_x64'
28 +
29 + - task: DownloadPipelineArtifact@2
30 + displayName: Download arm64 build artifact
31 + inputs:
32 + artifact: drop_wsl_build_arm64
33 + path: '$(Pipeline.Workspace)\drop_arm64'
34 +
35 + - task: PowerShell@2
36 + displayName: Generate DCAT submission metadata
37 + inputs:
38 + targetType: inline
39 + failOnStderr: true
40 + pwsh: true
41 + script: |
42 + $contentPath = '$(DcatContentPath)'
43 + $outputPath = '$(ob_outputDirectory)'
44 + $version = '$(buildStagePackageVersion)'
45 +
46 + New-Item -ItemType Directory -Path $contentPath -Force | Out-Null
47 + Copy-Item "$(Pipeline.Workspace)\drop_x64\bundle\wsl.$version.x64.msi" $contentPath
48 + Copy-Item "$(Pipeline.Workspace)\drop_x64\bundle\wsl.$version.x64.cab" $contentPath
49 + Copy-Item "$(Pipeline.Workspace)\drop_arm64\bundle\wsl.$version.arm64.msi" $contentPath
50 + Copy-Item "$(Pipeline.Workspace)\drop_arm64\bundle\wsl.$version.arm64.cab" $contentPath
51 +
52 + & "$(Pipeline.Workspace)\s\wsl-release-scripts\scripts\Dcat\New-DcatSubmission.ps1" `
53 + -ContentFolderPath $contentPath `
54 + -Version $version
55 +
56 + $jsonFiles = @(Get-ChildItem -Path $contentPath -Filter *.json)
57 + if ($jsonFiles.Count -ne 10) {
58 + throw "Expected 10 JSON files, found $($jsonFiles.Count)."
59 + }
60 +
61 + New-Item -ItemType Directory -Path $outputPath -Force | Out-Null
62 + Copy-Item $jsonFiles.FullName $outputPath
63 + Copy-Item "$(Pipeline.Workspace)\s\wsl-release-scripts\scripts\Dcat\Update-DcatSubmission.ps1" $outputPath
.pipelines/wsl-build-release-onebranch.yml
+6
@@ -33,6 +33,10 @@ resources:
33 type: git
34 name: OneBranch.Pipelines/GovernedTemplates
35 ref: refs/heads/main
36 + - repository: releaseScripts
37 + type: git
38 + name: Microsoft.WSL/wsl-release-scripts
39 + ref: refs/tags/v1
40
41 extends:
42 template: v2/Microsoft.Official.yml@templates
@@ -75,6 +79,8 @@ extends:
79 vsoOrg: microsoft
80 vsoProject: Microsoft.WSL
81
82 + - template: dcat-stage.yml@self
83 +
84 - template: test-stage.yml@self
85 parameters:
86 rs_prerelease_only: false