From 327168a31be4f7927dd9e1acfed1449249531e88 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Thu, 15 Jan 2026 09:10:20 -0800 Subject: [PATCH 1/5] Change release builds to use new build.ps1 for builds --- .pipelines/DSC-Official.yml | 6 +++--- .pipelines/DSC-Windows.yml | 2 +- packaging.ps1 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pipelines/DSC-Official.yml b/.pipelines/DSC-Official.yml index dd04a277c..cf2cc0c81 100644 --- a/.pipelines/DSC-Official.yml +++ b/.pipelines/DSC-Official.yml @@ -325,7 +325,7 @@ extends: $header = "Bearer $(AzToken)" $env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header $env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token' - ./packaging.ps1 -Release -Architecture x86_64-unknown-linux-musl + ./build.ps1 -Release -Architecture x86_64-unknown-linux-musl ./packaging.ps1 -PackageType tgz -Architecture x86_64-unknown-linux-musl -Release ./packaging.ps1 -PackageType rpm -Architecture x86_64-unknown-linux-musl -Release ./packaging.ps1 -PackageType deb -Architecture x86_64-unknown-linux-musl -Release @@ -388,7 +388,7 @@ extends: $header = "Bearer $(AzToken)" $env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header $env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token' - ./packaging.ps1 -Release -Architecture aarch64-unknown-linux-musl + ./build.ps1 -Release -Architecture aarch64-unknown-linux-musl ./packaging.ps1 -PackageType tgz -Architecture aarch64-unknown-linux-musl -Release ./packaging.ps1 -PackageType rpm -Architecture aarch64-unknown-linux-musl -Release ./packaging.ps1 -PackageType deb -Architecture aarch64-unknown-linux-musl -Release @@ -438,7 +438,7 @@ extends: $env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header $env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token' Write-Verbose -Verbose "Building for $(buildName)" - ./packaging.ps1 -Release -Architecture $(buildName) + ./build.ps1 -Release -Architecture $(buildName) ./packaging.ps1 -PackageType tgz -Architecture $(buildName) -Release Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)" Write-Host "##vso[artifact.upload containerfolder=release;artifactname=release]$(ob_outputDirectory)/DSC-$(PackageVersion)-$(buildName).tar.gz" diff --git a/.pipelines/DSC-Windows.yml b/.pipelines/DSC-Windows.yml index a6588e9e9..350447d6b 100644 --- a/.pipelines/DSC-Windows.yml +++ b/.pipelines/DSC-Windows.yml @@ -50,7 +50,7 @@ steps: $env:PATH += ";$LLVMBIN" write-verbose -verbose (gcm clang.exe | out-string) Write-Verbose -Verbose "Building for ${{ parameters.buildName }}" - ./packaging.ps1 -Release -Architecture ${{ parameters.buildName }} -SkipLinkCheck + ./build.ps1 -Release -Architecture ${{ parameters.buildName }} -SkipLinkCheck displayName: 'Build ${{ parameters.buildName }}' env: ob_restore_phase: true diff --git a/packaging.ps1 b/packaging.ps1 index 4667bbd4b..dbb8a8e55 100755 --- a/packaging.ps1 +++ b/packaging.ps1 @@ -346,7 +346,7 @@ if (!$SkipBuild) { New-Item -ItemType Directory $target -ErrorAction Ignore > $null # make sure dependencies are built first so clippy runs correctly - $windows_projects = @("lib/dsc-lib-pal", "lib/dsc-lib-registry", "resources/registry", "resources/reboot_pending", "adapters/wmi", "configurations/windows", 'extensions/appx') + $windows_projects = @("lib/dsc-lib-pal", "lib/dsc-lib-registry", "resources/registry", "resources/reboot_pending", "resources/WindowsUpdate","adapters/wmi", "configurations/windows", 'extensions/appx') $macOS_projects = @("resources/brew") $linux_projects = @("resources/apt") From bfe82286598a1ac31babe2915da69144a1b99148 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Thu, 15 Jan 2026 14:12:08 -0800 Subject: [PATCH 2/5] add debug tracing --- .pipelines/DSC-Windows.yml | 2 +- build.helpers.psm1 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pipelines/DSC-Windows.yml b/.pipelines/DSC-Windows.yml index 350447d6b..82f9346c0 100644 --- a/.pipelines/DSC-Windows.yml +++ b/.pipelines/DSC-Windows.yml @@ -50,7 +50,7 @@ steps: $env:PATH += ";$LLVMBIN" write-verbose -verbose (gcm clang.exe | out-string) Write-Verbose -Verbose "Building for ${{ parameters.buildName }}" - ./build.ps1 -Release -Architecture ${{ parameters.buildName }} -SkipLinkCheck + ./build.ps1 -Release -Architecture ${{ parameters.buildName }} -SkipLinkCheck -Verbose displayName: 'Build ${{ parameters.buildName }}' env: ob_restore_phase: true diff --git a/build.helpers.psm1 b/build.helpers.psm1 index ab32cd4ec..89a264c71 100644 --- a/build.helpers.psm1 +++ b/build.helpers.psm1 @@ -1429,6 +1429,8 @@ function Copy-BuildArtifact { } process { + Write-Verbose -Verbose (Get-ChildItem (Split-Path $artifactDirectory.RustTarget -Parent) | Out-String) + foreach ($p in $Project) { # SKip projects for non-current architecture if needed if (Test-ShouldSkipProject -Project $p -Architecture $Architecture) { From 37c1061a2a151cb22f7a0615c5d9bef49bf623e1 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Thu, 15 Jan 2026 15:03:06 -0800 Subject: [PATCH 3/5] add more tracing --- build.helpers.psm1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.helpers.psm1 b/build.helpers.psm1 index 89a264c71..3e65f407c 100644 --- a/build.helpers.psm1 +++ b/build.helpers.psm1 @@ -1429,7 +1429,8 @@ function Copy-BuildArtifact { } process { - Write-Verbose -Verbose (Get-ChildItem (Split-Path $artifactDirectory.RustTarget -Parent) | Out-String) + Write-Verbose -Verbose (Get-ChildItem $PSScriptRoot | Out-String) + Write-Verbose -Verbose (Get-ChildItem $PSScriptRoot\target | Out-String) foreach ($p in $Project) { # SKip projects for non-current architecture if needed From 3d195b81c10792fb3b7fbf55350c0739f61834b5 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Thu, 15 Jan 2026 16:13:03 -0800 Subject: [PATCH 4/5] Fix where to get cargo targets from --- .pipelines/DSC-Windows.yml | 2 +- build.helpers.psm1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/DSC-Windows.yml b/.pipelines/DSC-Windows.yml index 82f9346c0..6c9ce3e46 100644 --- a/.pipelines/DSC-Windows.yml +++ b/.pipelines/DSC-Windows.yml @@ -66,7 +66,7 @@ steps: # workaround known issue of building in OneBranch copying from TMP folder $null = New-Item -ItemType Directory -Path "${{ parameters.signSrcPath }}" -ErrorAction Ignore # copy only the exes from the TMP folder since it contains intermediately built files we don't want to sign - write-host 'Binaries in $(env:CARGO_TARGET_DIR)' + write-host 'Binaries in ${env:CARGO_TARGET_DIR}' Copy-Item -Path "$env:CARGO_TARGET_DIR/${{ parameters.buildName }}/${{ parameters.BuildConfiguration }}/*.exe" -Destination "${{ parameters.signSrcPath }}" -Verbose Copy-Item -Path "$(Build.SourcesDirectory)/DSC/bin/${{ parameters.buildName }}/${{ parameters.BuildConfiguration }}/*" -Recurse -Destination "${{ parameters.signSrcPath }}" -Verbose -Force write-host 'Binaries in ${{ parameters.signSrcPath }}' diff --git a/build.helpers.psm1 b/build.helpers.psm1 index 3e65f407c..bb4fec600 100644 --- a/build.helpers.psm1 +++ b/build.helpers.psm1 @@ -1021,7 +1021,7 @@ function Get-ArtifactDirectoryPath { return [DscArtifactDirectoryPath]@{ BinRoot = Join-Path $PSScriptRoot 'bin' Bin = Join-Path $PSScriptRoot 'bin' $configuration - RustTarget = Join-Path $PSScriptRoot 'target' $configuration + RustTarget = $env:CARGO_TARGET_DIR ?? (Join-Path $PSScriptRoot 'target' $configuration) MsixBundle = Join-Path $PSScriptRoot 'bin' 'msix' } } @@ -1029,7 +1029,7 @@ function Get-ArtifactDirectoryPath { [DscArtifactDirectoryPath]@{ BinRoot = Join-Path $PSScriptRoot 'bin' Bin = Join-Path $PSScriptRoot 'bin' $Architecture $configuration - RustTarget = Join-Path $PSScriptRoot 'target' $Architecture $configuration + RustTarget = $env:CARGO_TARGET_DIR ?? (Join-Path $PSScriptRoot 'target' $Architecture $configuration) MsixBundle = Join-Path $PSScriptRoot 'bin' 'msix' MsixTarget = Join-Path $PSScriptRoot 'bin' $Architecture 'msix' ZipTarget = Join-Path $PSScriptRoot 'bin' $Architecture 'zip' From ad868889b46d61b831efa404baccdc4da6405839 Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Thu, 15 Jan 2026 16:24:10 -0800 Subject: [PATCH 5/5] remove tracing --- build.helpers.psm1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.helpers.psm1 b/build.helpers.psm1 index bb4fec600..eedb8b2c7 100644 --- a/build.helpers.psm1 +++ b/build.helpers.psm1 @@ -1429,9 +1429,6 @@ function Copy-BuildArtifact { } process { - Write-Verbose -Verbose (Get-ChildItem $PSScriptRoot | Out-String) - Write-Verbose -Verbose (Get-ChildItem $PSScriptRoot\target | Out-String) - foreach ($p in $Project) { # SKip projects for non-current architecture if needed if (Test-ShouldSkipProject -Project $p -Architecture $Architecture) {