Browse Source

Build SiteExtensions (#11409)

John Luo 6 years ago
parent
commit
94f84c4776
3 changed files with 33 additions and 15 deletions
  1. 6 9
      .azure/pipelines/ci.yml
  2. 0 6
      eng/Build.props
  3. 27 0
      src/SiteExtensions/build.cmd

+ 6 - 9
.azure/pipelines/ci.yml

@@ -84,15 +84,12 @@ jobs:
       displayName: Build x86
 
     # This is in a separate build step with -forceCoreMsbuild to workaround MAX_PATH limitations - https://github.com/Microsoft/msbuild/issues/53
-    # TODO: need to figure out how to make site extensions build with Arcade. See https://github.com/aspnet/AspNetCore/issues/11186
-    # - script: ./build.cmd
-    #         -ci
-    #         -pack
-    #         -forceCoreMsbuild
-    #         -noBuildDeps
-    #         /p:BuildSiteExtensions=true
-    #         $(_BuildArgs)
-    #   displayName: Build SiteExtension
+    - script: .\src\SiteExtensions\build.cmd
+            -ci
+            -pack
+            -noBuildDeps
+            $(_BuildArgs)
+      displayName: Build SiteExtension
 
     # This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
     # consider running code-signing inline with the other previous steps.

+ 0 - 6
eng/Build.props

@@ -90,12 +90,6 @@
                         Include="$(RepoRoot)src\Installers\Rpm\**\*.*proj" />
       </ItemGroup>
 
-      <ItemGroup Condition=" '$(BuildSiteExtensions)' == 'true' ">
-        <ProjectToBuild Include="$(RepoRoot)src\SiteExtensions\Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj" />
-        <ProjectToBuild Include="$(RepoRoot)src\SiteExtensions\LoggingBranch\LoggingBranch.csproj" />
-        <ProjectToBuild Include="$(RepoRoot)src\SiteExtensions\LoggingAggregate\src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj" />
-      </ItemGroup>
-
       <ItemGroup>
         <NativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') "
                         Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)">

+ 27 - 0
src/SiteExtensions/build.cmd

@@ -0,0 +1,27 @@
+@ECHO OFF
+SET RepoRoot=%~dp0..\..
+
+ECHO Building Microsoft.AspNetCore.Runtime.SiteExtension
+CALL %RepoRoot%\build.cmd -arch x64 -projects %~dp0Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj /bl:artifacts/log/SiteExtensions-Runtime-x64.binlog %*
+CALL %RepoRoot%\build.cmd -arch x86 -projects %~dp0Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj /bl:artifacts/log/SiteExtensions-Runtime-x86.binlog %*
+
+IF %ERRORLEVEL% NEQ 0 (
+   EXIT /b %ErrorLevel%
+)
+
+ECHO Building LoggingBranch
+CALL %RepoRoot%\build.cmd -forceCoreMsbuild -arch x64 -projects %~dp0LoggingBranch\LB.csproj /bl:artifacts/log/SiteExtensions-LoggingBranch-x64.binlog %*
+CALL %RepoRoot%\build.cmd -forceCoreMsbuild -arch x86 -projects %~dp0LoggingBranch\LB.csproj /bl:artifacts/log/SiteExtensions-LoggingBranch-x86.binlog %*
+
+IF %ERRORLEVEL% NEQ 0 (
+   EXIT /b %ErrorLevel%
+)
+
+ECHO Building Microsoft.AspNetCore.AzureAppServices.SiteExtension
+CALL %RepoRoot%\build.cmd -forceCoreMsbuild -projects %~dp0LoggingAggregate\src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj /bl:artifacts/log/SiteExtensions-LoggingAggregate.binlog %*
+
+IF %ERRORLEVEL% NEQ 0 (
+   EXIT /b %ErrorLevel%
+)
+
+ECHO SiteExtensions successly built!