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..6c9ce3e46 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 -Verbose displayName: 'Build ${{ parameters.buildName }}' env: ob_restore_phase: true @@ -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 ab32cd4ec..eedb8b2c7 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' 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")