Skip to content

Commit

Permalink
Pass -publish parameters (#54620)
Browse files Browse the repository at this point in the history
* Pass -publish parameters
https://github.com/dotnet/aspnetcore/pull/54422/files introduced new build script switches for -publish and -no-publish to be compatible with VMR workflows. The aspnetcore CI jobs were passing /p:Publish=true instead of using such a switch. The default value for the new switch if not passed is false, so essentially this turned off publishing for much of aspnetcore. Fix this by not using the msbuild property. Instead, pass the switch. This matches standard arcade repo patterns.

* Add windows publishing argument

* Revert submodules

* Native tools on machine
  • Loading branch information
mmitche authored Mar 19, 2024
1 parent d581e01 commit e62490d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
14 changes: 11 additions & 3 deletions .azure/pipelines/ci-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ variables:
- group: Publish-Build-Assets
# The following extra properties are not set when testing. Use with final build.[cmd,sh] of asset-producing jobs.
- name: _PublishArgs
value: /p:Publish=true
/p:GenerateChecksums=true
value: /p:GenerateChecksums=true
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
- ${{ if ne(parameters.produceBinlogs, 'true') }}:
# Do not log most Windows steps in official builds; this is the slowest job. Site extensions step always logs.
Expand Down Expand Up @@ -343,6 +342,7 @@ stages:
-sign
-buildInstallers
-noBuildNative
-publish
/p:DotNetSignType=$(_SignType)
/p:AssetManifestFileName=aspnetcore-win.xml
$(_BuildArgs)
Expand Down Expand Up @@ -378,6 +378,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -407,6 +408,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-MacOS_x64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -464,6 +466,7 @@ stages:
--build-installers
--no-build-deps
--no-build-nodejs
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:BuildRuntimeArchive=false
-p:LinuxInstallerType=rpm
Expand Down Expand Up @@ -497,6 +500,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_arm.xml
$(_BuildArgs)
Expand Down Expand Up @@ -539,6 +543,7 @@ stages:
--build-installers
--no-build-deps
--no-build-nodejs
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:BuildRuntimeArchive=false
-p:LinuxInstallerType=rpm
Expand Down Expand Up @@ -574,6 +579,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -608,6 +614,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml
$(_BuildArgs)
Expand Down Expand Up @@ -640,6 +647,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -761,7 +769,7 @@ stages:
platform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8'
buildScript: './eng/build.sh $(_PublishArgs) --no-build-repo-tasks $(_InternalRuntimeDownloadArgs)'
buildScript: './eng/build.sh --publish --no-build-repo-tasks $(_PublishArgs) $(_InternalRuntimeDownloadArgs)'
skipPublishValidation: true
jobProperties:
timeoutInMinutes: 120
Expand Down
14 changes: 11 additions & 3 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ variables:
- group: Publish-Build-Assets
# The following extra properties are not set when testing. Use with final build.[cmd,sh] of asset-producing jobs.
- name: _PublishArgs
value: /p:Publish=true
/p:GenerateChecksums=true
value: /p:GenerateChecksums=true
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
- ${{ if ne(parameters.produceBinlogs, 'true') }}:
# Do not log most Windows steps in official builds; this is the slowest job. Site extensions step always logs.
Expand Down Expand Up @@ -345,6 +344,7 @@ stages:
-sign
-buildInstallers
-noBuildNative
-publish
/p:DotNetSignType=$(_SignType)
/p:AssetManifestFileName=aspnetcore-win.xml
$(_BuildArgs)
Expand Down Expand Up @@ -380,6 +380,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -409,6 +410,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-MacOS_x64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -466,6 +468,7 @@ stages:
--build-installers
--no-build-deps
--no-build-nodejs
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:BuildRuntimeArchive=false
-p:LinuxInstallerType=rpm
Expand Down Expand Up @@ -499,6 +502,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_arm.xml
$(_BuildArgs)
Expand Down Expand Up @@ -541,6 +545,7 @@ stages:
--build-installers
--no-build-deps
--no-build-nodejs
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:BuildRuntimeArchive=false
-p:LinuxInstallerType=rpm
Expand Down Expand Up @@ -576,6 +581,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -610,6 +616,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml
$(_BuildArgs)
Expand Down Expand Up @@ -642,6 +649,7 @@ stages:
--pack
--all
--no-build-java
--publish
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -763,7 +771,7 @@ stages:
platform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8'
buildScript: './eng/build.sh $(_PublishArgs) --no-build-repo-tasks $(_InternalRuntimeDownloadArgs)'
buildScript: './eng/build.sh --publish --no-build-repo-tasks $(_PublishArgs) $(_InternalRuntimeDownloadArgs)'
skipPublishValidation: true
jobProperties:
timeoutInMinutes: 120
Expand Down
1 change: 1 addition & 0 deletions .azure/pipelines/jobs/codesign-xplat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
flattenFolders: true
- powershell: .\eng\common\build.ps1
-ci
-nativeToolsOnMachine
-nobl
-msbuildEngine dotnet
-restore
Expand Down
5 changes: 5 additions & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Run tests.
.PARAMETER Sign
Run code signing.
.PARAMETER Publish
Run publishing.
.PARAMETER Configuration
Debug or Release
Expand Down Expand Up @@ -141,6 +144,7 @@ param(
[switch]$Pack, # Produce packages
[switch]$Test, # Run tests
[switch]$Sign, # Code sign
[switch]$Publish, # Run arcade publishing

[Alias('c')]
[ValidateSet('Debug', 'Release')]
Expand Down Expand Up @@ -262,6 +266,7 @@ if (-not $RunBuild) { $MSBuildArguments += "/p:NoBuild=true" }
$MSBuildArguments += "/p:Pack=$Pack"
$MSBuildArguments += "/p:Test=$Test"
$MSBuildArguments += "/p:Sign=$Sign"
$MSBuildArguments += "/p:Publish=$Publish"

$MSBuildArguments += "/p:TargetArchitecture=$Architecture"
$MSBuildArguments += "/p:TargetOsName=win"
Expand Down

0 comments on commit e62490d

Please sign in to comment.