diff options
author | William Godbe <wigodbe@microsoft.com> | 2021-01-13 01:06:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 01:06:52 +0300 |
commit | 0b598a9506446bf1ca730a886cb6b85c9d768fb7 (patch) | |
tree | 5a59e94fb9558a453efc82de7a01a4884e7b5f60 /src | |
parent | 3df5da13af8b40148eb5a207c9290381228305d1 (diff) |
Enable 2.1 official builds in AzDO (#28829)
* Try some internal props
* Pass envs to dockerbuild
* Fix job name
* Re-pin
* Set env vars
* Set defaults
Diffstat (limited to 'src')
-rw-r--r-- | src/Installers/Windows/AspNetCoreModule-Setup/build/settings/common.props | 4 | ||||
-rw-r--r-- | src/Installers/Windows/WindowsInstallers.proj | 28 | ||||
-rw-r--r-- | src/Installers/Windows/Wix.props | 10 | ||||
-rw-r--r-- | src/Installers/Windows/build.ps1 | 32 |
4 files changed, 44 insertions, 30 deletions
diff --git a/src/Installers/Windows/AspNetCoreModule-Setup/build/settings/common.props b/src/Installers/Windows/AspNetCoreModule-Setup/build/settings/common.props index 3dfffe943f..69fb5502a5 100644 --- a/src/Installers/Windows/AspNetCoreModule-Setup/build/settings/common.props +++ b/src/Installers/Windows/AspNetCoreModule-Setup/build/settings/common.props @@ -16,8 +16,8 @@ <IisOobWinSdkVersion Condition="'$(IisOobWinSdkVersion)' == ''">10.0.17134.0</IisOobWinSdkVersion> <WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$(IisOobWinSdkVersion)</WindowsTargetPlatformVersion> <CharacterSet>Unicode</CharacterSet> - <OutDir>bin\$(Configuration)\$(PlatformShortname)\</OutDir> - <IntDir>obj\$(Configuration)\$(PlatformShortname)\</IntDir> + <OutDir Condition=" '$(OutDir)' == '' ">bin\$(Configuration)\$(PlatformShortname)\</OutDir> + <IntDir Condition=" '$(IntDir)' == '' ">obj\$(Configuration)\$(PlatformShortname)\</IntDir> </PropertyGroup> <!-- diff --git a/src/Installers/Windows/WindowsInstallers.proj b/src/Installers/Windows/WindowsInstallers.proj index ed47388b68..e0c1a5068e 100644 --- a/src/Installers/Windows/WindowsInstallers.proj +++ b/src/Installers/Windows/WindowsInstallers.proj @@ -19,7 +19,7 @@ </ItemGroup> - <Target Name="Build"> + <Target Name="Build" DependsOnTargets="UnzipSharedFx"> <MSBuild Projects="@(InstallerProject)" Targets="Build" /> </Target> @@ -32,4 +32,28 @@ <MSBuild Projects="@(InstallerProject)" Targets="Restore" /> </Target> -</Project> + <Target Name="UnzipSharedFx"> + <Message Text="Unzipping x64 SharedFx to $(SharedFrameworkHarvestRootPath)x64" Importance="High" /> + + <ItemGroup> + <x64Archive Include="$(SharedFxDepsRoot)aspnetcore-runtime-internal-*-win-x64.zip" /> + <x86Archive Include="$(SharedFxDepsRoot)aspnetcore-runtime-internal-*-win-x86.zip" /> + </ItemGroup> + + <!-- We don't import version files here, so unzip whatever internal archives are in the .deps folder --> + <Unzip + SourceFiles="@(x64Archive)" + DestinationFolder="$(SharedFrameworkHarvestRootPath)x64" + Condition="!Exists('$(SharedFrameworkHarvestRootPath)x64/shared/')" + /> + + <Message Text="Unzipping x86 SharedFx to $(SharedFrameworkHarvestRootPath)x86" Importance="High" /> + + <Unzip + SourceFiles="@(x86Archive)" + DestinationFolder="$(SharedFrameworkHarvestRootPath)x86" + Condition="!Exists('$(SharedFrameworkHarvestRootPath)x86/shared/')" + /> + </Target> + +</Project>
\ No newline at end of file diff --git a/src/Installers/Windows/Wix.props b/src/Installers/Windows/Wix.props index 7dcf66b5d9..c3846a9386 100644 --- a/src/Installers/Windows/Wix.props +++ b/src/Installers/Windows/Wix.props @@ -1,7 +1,13 @@ <Project> <PropertyGroup> - <Version>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).$(BuildNumber)</Version> + <!-- Ugly hack - Wix doesn't accept build numbers larger than 65535, and AzDo's BuildIds are larger than that. + The largest we ever got on TeamCity was 31363, so we want to be in the range of 31364 - 65535. To achieve this we take the + AzDO build number modulo 34172 (65545 - 31363 = 34172), and add 31364 to that to give us a number in the desired range. --> + <InstallerBuildNumber>$(BuildNumber)</InstallerBuildNumber> + <InstallerBuildNumberModulo Condition="'$(BuildNumber)' != 't000'">$([MSBuild]::Modulo($(BuildNumber), 34172))</InstallerBuildNumberModulo> + <InstallerBuildNumber Condition="'$(BuildNumber)' != 't000'">$([MSBuild]::Add($(InstallerBuildNumberModulo), 31364))</InstallerBuildNumber> + <Version>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).$(InstallerBuildNumber)</Version> <Configuration Condition="'$(Configuration)' == ''">Release</Configuration> <Platform Condition="'$(Platform)' == ''">x64</Platform> <Lang Condition="'$(Lang)' == ''">ENU</Lang> @@ -35,4 +41,4 @@ <GenerateNupkgPowershellScript>$(RepositoryRoot)\src\Installers\Windows\GenerateNugetPackageWithMsi.ps1</GenerateNupkgPowershellScript> </PropertyGroup> -</Project> +</Project>
\ No newline at end of file diff --git a/src/Installers/Windows/build.ps1 b/src/Installers/Windows/build.ps1 index f8df1c7192..8513a083fd 100644 --- a/src/Installers/Windows/build.ps1 +++ b/src/Installers/Windows/build.ps1 @@ -6,18 +6,9 @@ [cmdletbinding()] param( [string]$Configuration = 'Debug', - [Parameter(Mandatory = $true)] - [Alias("x86")] - [string]$Runtime86Zip, - [Parameter(Mandatory = $true)] - [Alias("x64")] - [string]$Runtime64Zip, [string]$BuildNumber = 't000', - [switch]$IsFinalBuild, - [string]$SignType = '', - [string]$PackageVersionPropsUrl = $null, + [string]$PackageVersionPropsUrl = $env:PB_PackageVersionPropsUrl, [string]$AccessTokenSuffix = $null, - [string]$AssetRootUrl = $null, [switch]$clean ) @@ -27,20 +18,13 @@ Import-Module -Scope Local "$repoRoot/scripts/common.psm1" -Force $msbuild = Get-MSBuildPath -Prerelease -requires 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' $harvestRoot = "$repoRoot/obj/sfx/" +$sharedFxDepsRoot = "$repoRoot/.deps/fx/" if ($clean) { Remove-Item -Recurse -Force $harvestRoot -ErrorAction Ignore | Out-Null } New-Item "$harvestRoot/x86", "$harvestRoot/x64" -ItemType Directory -ErrorAction Ignore | Out-Null -if (-not (Test-Path "$harvestRoot/x86/shared/")) { - Expand-Archive $Runtime86Zip -DestinationPath "$harvestRoot/x86" -} - -if (-not (Test-Path "$harvestRoot/x64/shared/")) { - Expand-Archive $Runtime64Zip -DestinationPath "$harvestRoot/x64" -} - Push-Location $PSScriptRoot try { Invoke-Block { & $msbuild ` @@ -56,14 +40,15 @@ try { [string[]] $msbuildArgs = @() + # PipeBuild parameters + $msbuildArgs += "-p:SignType=${env:PB_SignType}" + $msbuildArgs += "-p:DotNetAssetRootUrl=${env:PB_AssetRootUrl}" + $msbuildArgs += "-p:IsFinalBuild=${env:PB_IsFinalBuild}" + if ($clean) { $msbuildArgs += '-t:Clean' } - if ($AssetRootUrl) { - $msbuildArgs += "-p:DotNetAssetRootUrl=$AssetRootUrl" - } - if ($AccessTokenSuffix) { $msbuildArgs += "-p:DotNetAccessTokenSuffix=$AccessTokenSuffix" } @@ -87,10 +72,9 @@ try { -nodeReuse:false ` -clp:Summary ` "-p:SharedFrameworkHarvestRootPath=$repoRoot/obj/sfx/" ` + "-p:SharedFxDepsRoot=$sharedFxDepsRoot" ` "-p:Configuration=$Configuration" ` "-p:BuildNumber=$BuildNumber" ` - "-p:SignType=$SignType" ` - "-p:IsFinalBuild=$IsFinalBuild" ` "-bl:$repoRoot/artifacts/logs/installers.msbuild.binlog" ` @msbuildArgs } |