Skip to content

Commit

Permalink
Backport infrastructure changes and source reorganization
Browse files Browse the repository at this point in the history
* Add build definition for Azure DevOps
* Put code for metapackages in a subfolder
* Update targets to prepare for submodules merging into this repo
* Add source code for windows installer
* Add source code for Debian installers
  • Loading branch information
Nate McMaster committed Oct 12, 2018
1 parent bd37a21 commit fb3f5d9
Show file tree
Hide file tree
Showing 92 changed files with 4,180 additions and 119 deletions.
22 changes: 0 additions & 22 deletions .appveyor.yml

This file was deleted.

225 changes: 225 additions & 0 deletions .azure/pipelines/ci-official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
trigger:
branches:
include:
- master
- release/*
exclude:
- release/2.0

phases:
- phase: Windows
queue:
name: DotNetCore-Windows
timeoutInMinutes: 120
matrix:
Release:
BuildConfiguration: Release
variables:
CI: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true

# This variable is required by MicroBuildSigningPlugin to determine permissions for codesigning.
TeamName: AspNetCore

# SignType = { test, real }
# This is prefixed underscore because variables automatically become environment variables (and therefore MSBuild properties),
# and this one was causing issues in MSBuild projects which use the $(SignType) MSbuild prop.
_SignType: real

steps:
- task: NodeTool@0
displayName: Install Node 10.x
inputs:
versionSpec: 10.x
- task: MicroBuildSigningPlugin@1
displayName: Install MicroBuild plugin
condition: and(succeeded(), in(variables['_SignType'], 'test', 'real'))
inputs:
signType: $(_SignType)
zipSources: false
# TODO: configure build.cmd to build both x64 and x86 in one invocation
- script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:Build /t:BuildSharedFx /p:SharedFxRID=win-x64 /t:BuildFallbackArchive
displayName: Build NuGet packages and win-x64 runtime
- script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-x86
displayName: Build win-x86 runtime
- powershell: >
src/Installers/Windows/clone_and_build_ancm.ps1
-GitCredential '$(dn-bot-devdiv-build-rw-code-rw)'
-Config $(BuildConfiguration)
-BuildNumber $(Build.BuildNumber)
-SignType $(_SignType)
displayName: Build ANCM installers
# TODO: configure harvesting to run as a part of build.cmd so we don't need a hard-coded version here.
- powershell: >
src/Installers/Windows/build.ps1
-x64 artifacts/runtime/aspnetcore-runtime-internal-2.1.6-servicing-$(Build.BuildNumber)-win-x64.zip
-x86 artifacts/runtime/aspnetcore-runtime-internal-2.1.6-servicing-$(Build.BuildNumber)-win-x86.zip
-Config $(BuildConfiguration)
-BuildNumber $(Build.BuildNumber)
-SignType $(_SignType)
displayName: Build Windows installers
- task: PublishTestResults@2
displayName: Publish test results
condition: always()
inputs:
testRunner: vstest
testResultsFiles: 'artifacts/logs/**/*.trx'
- task: PublishBuildArtifacts@1
displayName: Upload artifacts
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
pathtoPublish: ./artifacts/
artifactName: artifacts-Windows-Release
artifactType: Container
# Detect OSS Components in use in the product. Only needs to run on one OS in the matrix.
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
# This funky GUID represents the product "ASP.NET and EF Core"
governanceProduct: 'c641993b-8380-e811-80c3-0004ffb4789e'
snapshotForceEnabled: true
- task: MicroBuildCleanup@1
displayName: Cleanup MicroBuild tasks
condition: always()

- phase: macOS
dependsOn: Windows
queue:
name: Hosted macOS Preview
matrix:
Release:
BuildConfiguration: Release
variables:
CI: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
steps:
- task: DownloadBuildArtifacts@0
displayName: Download artifacts
inputs:
artifactName: artifacts-Windows-Release
downloadPath: $(Build.SourcesDirectory)/.deps
itemPattern: '**/*.nupkg'
# Workaround https://github.com/Microsoft/vsts-tasks/issues/6739
- task: CopyFiles@2
displayName: Copy package assets to correct folder
inputs:
sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release
targetFolder: $(Build.SourcesDirectory)/.deps
- script: >
./build.sh
--ci
/t:Prepare
/t:Restore
/t:GeneratePropsFiles
/t:BuildSharedFx
/p:SharedFxRID=osx-x64
/p:BuildNumber=$(Build.BuildNumber)
displayName: Build osx-x64 runtime
- task: PublishTestResults@2
displayName: Publish test results
condition: always()
inputs:
testRunner: vstest
testResultsFiles: 'artifacts/logs/**/*.trx'
- task: PublishBuildArtifacts@1
displayName: Upload artifacts
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
pathtoPublish: ./artifacts/
artifactName: artifacts-macOS-Release
artifactType: Container

- phase: Linux
dependsOn:
- Windows
- macOS
queue:
name: DotNetCore-Linux
matrix:
Release:
BuildConfiguration: Release
variables:
CI: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
steps:
- task: DownloadBuildArtifacts@0
displayName: Download artifacts
inputs:
artifactName: artifacts-Windows-Release
downloadPath: $(Build.SourcesDirectory)/.deps
itemPattern: '**/*.nupkg'
- task: DownloadBuildArtifacts@0
displayName: Download Windows artifacts
inputs:
artifactName: artifacts-Windows-Release
downloadPath: $(Build.SourcesDirectory)/.r
itemPattern: '**/aspnetcore-runtime-*'
- task: DownloadBuildArtifacts@0
displayName: Download macOS artifacts
inputs:
artifactName: artifacts-macOS-Release
downloadPath: $(Build.SourcesDirectory)/.r
itemPattern: '**/aspnetcore-runtime-*'
# Workaround https://github.com/Microsoft/vsts-tasks/issues/6739
- task: CopyFiles@2
displayName: Copy package assets to correct folder
inputs:
sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release
targetFolder: $(Build.SourcesDirectory)/.deps
# TODO: Make the cumulative zips build in their own step
- task: CopyFiles@2
displayName: Copy package assets to correct folder
inputs:
sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-Windows-Release
targetFolder: $(Build.SourcesDirectory)/artifacts/
- task: CopyFiles@2
displayName: Copy package assets to correct folder
inputs:
sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-macOS-Release
targetFolder: $(Build.SourcesDirectory)/artifacts/
- script: >
./build.sh
--ci
/t:Prepare
/t:Restore
/t:GeneratePropsFiles
/t:BuildSharedFx
/p:SharedFxRID=linux-x64
/p:BuildNumber=$(Build.BuildNumber)
displayName: Build linux-x64 runtime
- script: >
./build.sh
--ci
/t:BuildSharedFx
/p:SharedFxRID=linux-arm
/p:BuildNumber=$(Build.BuildNumber)
displayName: Build linux-arm runtime
- script: >
./dockerbuild.sh
alpine
/t:Prepare
/t:GeneratePropsFiles
/t:BuildSharedFx
/p:SharedFxRID=linux-musl-x64
/p:BuildNumber=$(Build.BuildNumber)
displayName: Build linux-musl-x64 runtime
# TODO: configure installers to run in one build.sh invocation
- script: >
./build.sh
--ci
/t:BuildInstallers
/p:_SharedFxSourceDir=$(Build.SourcesDirectory)/artifacts/runtime/
displayName: Build linux installers
- task: PublishTestResults@2
displayName: Publish test results
condition: always()
inputs:
testRunner: vstest
testResultsFiles: 'artifacts/logs/**/*.trx'
- task: PublishBuildArtifacts@1
displayName: Upload artifacts
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
pathtoPublish: ./artifacts/
artifactName: artifacts-Linux-Release
artifactType: Container
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin
obj
bin/
obj/
.vs/
*.suo
*.user
Expand All @@ -11,11 +11,9 @@ _ReSharper.*
*.psess
*.binlog
*.log
packages
target
artifacts
artifacts/
StyleCop.Cache
node_modules
node_modules/
*.snk
.nuget
.r
Expand Down
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

20 changes: 18 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
<Project>
<Import Project="version.props" />
<Import Project="build\common.props" />

<PropertyGroup>
<Product>Microsoft ASP.NET Core</Product>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<RepositoryUrl>https://github.com/aspnet/Universe</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)eng\AspNetCore.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<Import Project="build\external-dependencies.props" />
<Import Project="build\sources.props" />

<PropertyGroup>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$(RepositoryRoot)artifacts\</ArtifactsDir>
<ArtifactsObjDir>$(ArtifactsDir)obj\</ArtifactsObjDir>
<ArtifactsConfigurationDir>$(ArtifactsDir)$(Configuration)\</ArtifactsConfigurationDir>
<ArtifactsBinDir>$(ArtifactsConfigurationDir)bin\</ArtifactsBinDir>
<PackageOutputPath>$(ArtifactsConfigurationDir)packages\</PackageOutputPath>
</PropertyGroup>

<Import Project="eng\targets\Wix.Common.props" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />
</Project>
3 changes: 3 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<Project>
<PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion>
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
</PropertyGroup>

<Import Project="eng\targets\Wix.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />
</Project>
37 changes: 37 additions & 0 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.NET Core uses third-party libraries or other resources that may be
distributed under licenses different than the .NET Core software.

In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:

dotnet@microsoft.com

The attached notices are provided for information only.

License notice for dotnet-deb-tool
------------------------------------

The MIT License (MIT)

Copyright (c) .NET Foundation and Contributors

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

5 changes: 3 additions & 2 deletions build/SharedFx.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
<_WorkRoot>$(RepositoryRoot).w\</_WorkRoot>
<_WorkLayoutDir>$(_WorkRoot).l\</_WorkLayoutDir>
<_WorkOutputDir>$(_WorkRoot).o\</_WorkOutputDir>
<_MetapackageSrcRoot>$(RepositoryRoot)src\</_MetapackageSrcRoot>
<_MetapackageSrcRoot>$(RepositoryRoot)src\Packages\</_MetapackageSrcRoot>
<_TemplatesDir>$(MSBuildThisFileDirectory)tools\templates\</_TemplatesDir>
<_DockerDir>$(MSBuildThisFileDirectory)tools\docker\</_DockerDir>
<_PackagingDir>$(MSBuildThisFileDirectory)tools\packaging\</_PackagingDir>
<_DebToolDir>$(MSBuildThisFileDirectory)tools\dotnet-deb-tool-consumer\</_DebToolDir>
<_SharedFxSourceDir>$(RepositoryRoot).deps\Signed\SharedFx\</_SharedFxSourceDir>
<_InstallerSourceDir>$(RepositoryRoot).deps\Installers\</_InstallerSourceDir>
<_SymbolsSourceDir>$(RepositoryRoot).deps\symbols\</_SymbolsSourceDir>
Expand All @@ -17,6 +16,8 @@
<!-- 3B = semicolon in ASCII -->
<PathSeparator Condition="'$(PathSeparator)' == ''">:</PathSeparator>
<PathSeparator Condition="$(SharedFxRID.StartsWith('win'))">%3B</PathSeparator>
<ArchiveExtension>.tar.gz</ArchiveExtension>
<ArchiveExtension Condition="$(SharedFxRID.StartsWith('win'))">.zip</ArchiveExtension>

<LibPrefix Condition="$([MSBuild]::IsOSPlatform('Linux')) OR $([MSBuild]::IsOSPlatform('OSX'))">lib</LibPrefix>
<LibExtension>.so</LibExtension>
Expand Down
Loading

0 comments on commit fb3f5d9

Please sign in to comment.