Use stages pipeline (#13040)

- #11924
- change ci.yml to use stages and post-build.yml
  - add use of publish-build-assets.yml and post-build.yml
  - create manifests and push to artifacts in last build step of each job
    - pass more MSBuild properties into those builds
    - use Arcade to publish installers
  - use distinct `$(AssetManifestFileName)` values per job
    - set global property to override what's hard-coded in Publish.proj
- change codesign-xplat.yml to use empty.proj and normal Arcade signing and publication process
  - remove XPlatPackageSigner.proj
- change default-build.yml to use job.yml
  - remove unused parameters e.g. `matrix`, `poolName`, `variables`
  - use `enableMicrobuild` and `enablePublishTestResults` to eliminate duplicate build steps
- add .dll's and .exe's as files to sign w/ Microsoft400
  - add signcheck exclusions
- remove custom manifest generation i.e. the `GenerateBuildAssetManifest` target and related artifacts
- update docker infrastructure to use same paths in and out of the container
  - avoids problems adding to artifacts from within the builds
- correct typo in build.sh
- use `$env:DOTNET_INSTALL_DIR` in `DotNetCommands`
  - relax expectations that an arch-specific folder exists under (say) `$env:DOTNET_HOME`
  - avoids need to define `$env:DOTNET_HOME` in all jobs on CI
- update dependencies from dotnet/arcade build '20190908.2'
  - upgrade to eg. Arcade SDK '1.0.0-beta.19458.2' package version
  - pick up dotnet/arcade@dd593acc8b fix
    - enable use of `%(PublishFlatContainer)` metadata and correct signing validation issues
- use `$(DotNetFinalVersionKind)` in preparation for servicing builds
  - set `$(IsStableBuild)` for use in Arcade infrastructure
- disable signing validation for now (see #13864)

nits:
- upload logs in first artifact
- remove attempts to package non-existent VSIX
  - follow-up to 29cf7ecb80
- respect verbosity setting in build.sh
- add more information to Artifacts.md
- enable test signing in internal PRs
This commit is contained in:
Doug Bunting 2019-09-10 20:43:24 -07:00 committed by GitHub
parent 1b83f7d4e4
commit 04705ee4f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 886 additions and 830 deletions

View File

@ -22,14 +22,53 @@ variables:
value: true value: true
- name: _TeamName - name: _TeamName
value: AspNetCore value: AspNetCore
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - name: _DotNetPublishToBlobFeed
value: true
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: .NETCORE
- name: _DotNetValidationArtifactsCategory
value: .NETCORE
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
- name: _BuildArgs
value: ''
- name: _PublishArgs
value: ''
- name: _SignType
value: ''
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- group: DotNet-Blob-Feed
- group: Publish-Build-Assets
- name: _BuildArgs - name: _BuildArgs
value: /p:TeamName=$(_TeamName) value: /p:TeamName=$(_TeamName)
/p:OfficialBuildId=$(Build.BuildNumber) /p:OfficialBuildId=$(Build.BuildNumber)
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - name: _SignType
value: real
# 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:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- name: _BuildArgs - name: _BuildArgs
value: '' value: ''
- name: _SignType
valule: test
- name: _PublishArgs
value: ''
stages:
- stage: build
displayName: Build
jobs: jobs:
# Code check # Code check
- template: jobs/default-build.yml - template: jobs/default-build.yml
@ -59,6 +98,7 @@ jobs:
- script: "echo ##vso[build.addbuildtag]release-candidate" - script: "echo ##vso[build.addbuildtag]release-candidate"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), in(variables['DotNetFinalVersionKind'], 'release', 'prerelease')) condition: and(ne(variables['Build.Reason'], 'PullRequest'), in(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
displayName: 'Set CI tags' displayName: 'Set CI tags'
# !!! NOTE !!! Some of these steps have disabled code signing. # !!! NOTE !!! Some of these steps have disabled code signing.
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even # This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even
# if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing. # if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing.
@ -73,10 +113,10 @@ jobs:
/bl:artifacts/log/build.x64.binlog /bl:artifacts/log/build.x64.binlog
$(_BuildArgs) $(_BuildArgs)
displayName: Build x64 displayName: Build x64
# TODO: make it possible to build for one Windows architecture at a time
# This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196
# Build the x86 shared framework # Build the x86 shared framework
# TODO: make it possible to build for one Windows architecture at a time
# This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196
- script: ./build.cmd - script: ./build.cmd
-ci -ci
-arch x86 -arch x86
@ -106,6 +146,7 @@ jobs:
-noRestore -noRestore
-sign -sign
/bl:artifacts/log/build.codesign.binlog /bl:artifacts/log/build.codesign.binlog
/p:DotNetSignType=$(_SignType)
$(_BuildArgs) $(_BuildArgs)
displayName: Code sign packages displayName: Code sign packages
@ -115,7 +156,11 @@ jobs:
-sign -sign
-buildInstallers -buildInstallers
/bl:artifacts/log/installers.msbuild.binlog /bl:artifacts/log/installers.msbuild.binlog
/p:DotNetSignType=$(_SignType)
/p:AssetManifestFileName=aspnetcore-win-x64-x86.xml
$(_BuildArgs) $(_BuildArgs)
$(_PublishArgs)
/p:PublishInstallerBaseVersion=true
displayName: Build Installers displayName: Build Installers
artifacts: artifacts:
@ -124,14 +169,6 @@ jobs:
publishOnError: true publishOnError: true
- name: Windows_Packages - name: Windows_Packages
path: artifacts/packages/ path: artifacts/packages/
- name: Windows_Symbols
path: artifacts/symbols/
- name: Windows_VSIX
path: artifacts/VSSetup/
- name: Windows_Manifests
path: artifacts/manifests/
- name: Windows_Installers
path: artifacts/installers/
# Build Windows ARM # Build Windows ARM
- template: jobs/default-build.yml - template: jobs/default-build.yml
@ -146,21 +183,20 @@ jobs:
-pack -pack
-noBuildNodeJS -noBuildNodeJS
-noBuildJava -noBuildJava
/p:OnlyPackPlatformSpecificPackages=true
/bl:artifacts/log/build.win-arm.binlog /bl:artifacts/log/build.win-arm.binlog
/p:DotNetSignType=$(_SignType)
/p:OnlyPackPlatformSpecificPackages=true
/p:AssetManifestFileName=aspnetcore-win-arm.xml
$(_BuildArgs) $(_BuildArgs)
$(_PublishArgs)
installNodeJs: false installNodeJs: false
installJdk: false installJdk: false
artifacts: artifacts:
- name: Windows_arm_Packages
path: artifacts/packages/
- name: Windows_arm_Manifests
path: artifacts/manifests/
- name: Windows_arm_Installers
path: artifacts/installers/
- name: Windows_arm_Logs - name: Windows_arm_Logs
path: artifacts/log/ path: artifacts/log/
publishOnError: true publishOnError: true
- name: Windows_arm_Packages
path: artifacts/packages/
# Build MacOS # Build MacOS
- template: jobs/default-build.yml - template: jobs/default-build.yml
@ -175,19 +211,17 @@ jobs:
--no-build-java --no-build-java
-p:OnlyPackPlatformSpecificPackages=true -p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.macos.binlog -bl:artifacts/log/build.macos.binlog
-p:AssetManifestFileName=aspnetcore-MacOS_x64.xml
$(_BuildArgs) $(_BuildArgs)
$(_PublishArgs)
installNodeJs: false installNodeJs: false
installJdk: false installJdk: false
artifacts: artifacts:
- name: MacOS_x64_Packages
path: artifacts/packages/
- name: MacOS_x64_Manifests
path: artifacts/manifests/
- name: MacOS_x64_Installers
path: artifacts/installers/
- name: MacOS_x64_Logs - name: MacOS_x64_Logs
path: artifacts/log/ path: artifacts/log/
publishOnError: true publishOnError: true
- name: MacOS_x64_Packages
path: artifacts/packages/
- template: jobs/codesign-xplat.yml - template: jobs/codesign-xplat.yml
parameters: parameters:
inputName: MacOS_x64 inputName: MacOS_x64
@ -236,20 +270,18 @@ jobs:
-p:BuildRuntimeArchive=false \ -p:BuildRuntimeArchive=false \
-p:LinuxInstallerType=rpm \ -p:LinuxInstallerType=rpm \
-bl:artifacts/log/build.rpm.binlog \ -bl:artifacts/log/build.rpm.binlog \
$(_BuildArgs) -p:AssetManifestFileName=aspnetcore-Linux_x64.xml \
$(_BuildArgs) \
$(_PublishArgs)
displayName: Build RPM installers displayName: Build RPM installers
installNodeJs: false installNodeJs: false
installJdk: false installJdk: false
artifacts: artifacts:
- name: Linux_x64_Packages
path: artifacts/packages/
- name: Linux_x64_Manifests
path: artifacts/manifests/
- name: Linux_x64_Installers
path: artifacts/installers/
- name: Linux_x64_Logs - name: Linux_x64_Logs
path: artifacts/log/ path: artifacts/log/
publishOnError: true publishOnError: true
- name: Linux_x64_Packages
path: artifacts/packages/
- template: jobs/codesign-xplat.yml - template: jobs/codesign-xplat.yml
parameters: parameters:
inputName: Linux_x64 inputName: Linux_x64
@ -268,19 +300,17 @@ jobs:
--no-build-java --no-build-java
-p:OnlyPackPlatformSpecificPackages=true -p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.linux-arm.binlog -bl:artifacts/log/build.linux-arm.binlog
-p:AssetManifestFileName=aspnetcore-Linux_arm.xml
$(_BuildArgs) $(_BuildArgs)
$(_PublishArgs)
installNodeJs: false installNodeJs: false
installJdk: false installJdk: false
artifacts: artifacts:
- name: Linux_arm_Packages
path: artifacts/packages/
- name: Linux_arm_Manifests
path: artifacts/manifests/
- name: Linux_arm_Installers
path: artifacts/installers/
- name: Linux_arm_Logs - name: Linux_arm_Logs
path: artifacts/log/ path: artifacts/log/
publishOnError: true publishOnError: true
- name: Linux_arm_Packages
path: artifacts/packages/
- template: jobs/codesign-xplat.yml - template: jobs/codesign-xplat.yml
parameters: parameters:
inputName: Linux_arm inputName: Linux_arm
@ -299,19 +329,17 @@ jobs:
--no-build-java --no-build-java
-p:OnlyPackPlatformSpecificPackages=true -p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.arm64.binlog -bl:artifacts/log/build.arm64.binlog
-p:AssetManifestFileName=aspnetcore-Linux_arm64.xml
$(_BuildArgs) $(_BuildArgs)
$(_PublishArgs)
installNodeJs: false installNodeJs: false
installJdk: false installJdk: false
artifacts: artifacts:
- name: Linux_arm64_Packages
path: artifacts/packages/
- name: Linux_arm64_Manifests
path: artifacts/manifests/
- name: Linux_arm64_Installers
path: artifacts/installers/
- name: Linux_arm64_Logs - name: Linux_arm64_Logs
path: artifacts/log/ path: artifacts/log/
publishOnError: true publishOnError: true
- name: Linux_arm64_Packages
path: artifacts/packages/
- template: jobs/codesign-xplat.yml - template: jobs/codesign-xplat.yml
parameters: parameters:
inputName: Linux_arm64 inputName: Linux_arm64
@ -333,19 +361,17 @@ jobs:
--no-build-java --no-build-java
-p:OnlyPackPlatformSpecificPackages=true -p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.musl.binlog -bl:artifacts/log/build.musl.binlog
-p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml
$(_BuildArgs) $(_BuildArgs)
$(_PublishArgs)
installNodeJs: false installNodeJs: false
installJdk: false installJdk: false
artifacts: artifacts:
- name: Linux_musl_x64_Packages
path: artifacts/packages/
- name: Linux_musl_x64_Manifests
path: artifacts/manifests/
- name: Linux_musl_x64_Installers
path: artifacts/installers/
- name: Linux_musl_x64_Logs - name: Linux_musl_x64_Logs
path: artifacts/log/ path: artifacts/log/
publishOnError: true publishOnError: true
- name: Linux_musl_x64_Packages
path: artifacts/packages/
- template: jobs/codesign-xplat.yml - template: jobs/codesign-xplat.yml
parameters: parameters:
inputName: Linux_musl_x64 inputName: Linux_musl_x64
@ -367,19 +393,17 @@ jobs:
--no-build-java --no-build-java
-p:OnlyPackPlatformSpecificPackages=true -p:OnlyPackPlatformSpecificPackages=true
-bl:artifacts/log/build.musl.binlog -bl:artifacts/log/build.musl.binlog
-p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml
$(_BuildArgs) $(_BuildArgs)
$(_PublishArgs)
installNodeJs: false installNodeJs: false
installJdk: false installJdk: false
artifacts: artifacts:
- name: Linux_musl_arm64_Packages
path: artifacts/packages/
- name: Linux_musl_arm64_Manifests
path: artifacts/manifests/
- name: Linux_musl_arm64_Installers
path: artifacts/installers/
- name: Linux_musl_arm64_Logs - name: Linux_musl_arm64_Logs
path: artifacts/log/ path: artifacts/log/
publishOnError: true publishOnError: true
- name: Linux_musl_arm64_Packages
path: artifacts/packages/
- template: jobs/codesign-xplat.yml - template: jobs/codesign-xplat.yml
parameters: parameters:
inputName: Linux_musl_arm64 inputName: Linux_musl_arm64
@ -433,9 +457,9 @@ jobs:
- template: jobs/default-build.yml - template: jobs/default-build.yml
parameters: parameters:
condition: ne(variables['SkipTests'], 'true') condition: ne(variables['SkipTests'], 'true')
jobName: MacOs_Test jobName: MacOS_Test
jobDisplayName: "Test: macOS 10.13" jobDisplayName: "Test: macOS 10.13"
agentOs: macOs agentOs: macOS
isTestingJob: true isTestingJob: true
buildArgs: --all --test "/p:RunTemplateTests=false" buildArgs: --all --test "/p:RunTemplateTests=false"
beforeBuild: beforeBuild:
@ -511,7 +535,6 @@ jobs:
# For the purpose of building Linux distros, we can't depend on features of the SDK # For the purpose of building Linux distros, we can't depend on features of the SDK
# which may not exist in pre-built versions of the SDK # which may not exist in pre-built versions of the SDK
# Pinning to preview 8 since preview 9 has breaking changes # Pinning to preview 8 since preview 9 has breaking changes
# version: 3.0.x
version: 3.0.100-preview8-013656 version: 3.0.100-preview8-013656
installationPath: $(DotNetCoreSdkDir) installationPath: $(DotNetCoreSdkDir)
includePreviewVersions: true includePreviewVersions: true
@ -536,3 +559,36 @@ jobs:
artifactName: Source_Build_Packages artifactName: Source_Build_Packages
artifactType: Container artifactType: Container
parallel: true parallel: true
# Publish to the BAR
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
dependsOn:
- Windows_build
- Windows_arm_build
- CodeSign_Xplat_MacOS_x64
- CodeSign_Xplat_Linux_x64
- CodeSign_Xplat_Linux_arm
- CodeSign_Xplat_Linux_arm64
- CodeSign_Xplat_Linux_musl_x64
- CodeSign_Xplat_Linux_musl_arm64
# In addition to the dependencies above, ensure the build was successful overall.
- Code_check
- Linux_Test
- MacOS_Test
- Source_Build
- Windows_Templates_Test
- Windows_Test
pool:
vmImage: vs2017-win2016
publishUsingPipelines: ${{ variables._PublishUsingPipelines }}
enablePublishBuildArtifacts: true # publish artifacts/log files
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/post-build/post-build.yml
parameters:
# See https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
enableSigningValidation: false
publishInstallersAndChecksums: true

View File

@ -19,13 +19,30 @@ jobs:
displayName: Download ${{ parameters.inputName }} artifacts displayName: Download ${{ parameters.inputName }} artifacts
inputs: inputs:
artifactName: ${{ parameters.inputName }}_Packages artifactName: ${{ parameters.inputName }}_Packages
downloadPath: $(Build.StagingDirectory)/deps/ downloadPath: $(Build.StagingDirectory)/downloaded_packages/
itemPattern: '**/*.nupkg' itemPattern: '**/*.nupkg'
- task: MSBuild@1 - task: CopyFiles@2
displayName: Code-sign .nupkg files displayName: Copy packages to ArtifactsShippingPackagesDir
inputs: inputs:
solution: eng\tools\XplatPackageSigner\XplatPackageSigner.proj sourceFolder: $(Build.StagingDirectory)/downloaded_packages/
msbuildArguments: /p:SignType=$(_SignType) /p:DirectoryToSign=$(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\ contents: '**/*.nupkg'
targetFolder: $(Build.SourcesDirectory)/artifacts/packages/$(BuildConfiguration)/shipping/
flattenFolders: true
- powershell: .\eng\common\build.ps1
-ci
-restore
-sign
-publish
-configuration $(BuildConfiguration)
-projects $(Build.SourcesDirectory)/eng/empty.proj
/p:AssetManifestFileName=aspnetcore-${{ parameters.inputName }}-signed.xml
/p:DotNetSignType=$(_SignType)
$(_BuildArgs)
$(_PublishArgs)
displayName: Sign and publish packages
artifacts: artifacts:
- name: CodeSign_Xplat_${{ parameters.inputName }}_Logs
path: artifacts/log/
publishOnError: true
- name: ${{ parameters.inputName }}_Packages_Signed - name: ${{ parameters.inputName }}_Packages_Signed
path: $(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\ path: artifacts/packages/

View File

@ -5,10 +5,6 @@
# The name of the job. Defaults to the name of the OS. No spaces allowed # The name of the job. Defaults to the name of the OS. No spaces allowed
# jobDisplayName: string # jobDisplayName: string
# The friendly job name to display in the UI. Defaults to the name of the OS. # The friendly job name to display in the UI. Defaults to the name of the OS.
# poolName: string
# The name of the Azure DevOps agent pool to use.
# poolVmImage: string
# The name of a virtual machine image to use. Primarily of interest when using the Hosted pools.
# agentOs: string # agentOs: string
# Used in templates to define variables which are OS specific. Typically from the set { Windows, Linux, macOS } # Used in templates to define variables which are OS specific. Typically from the set { Windows, Linux, macOS }
# buildArgs: string # buildArgs: string
@ -21,16 +17,14 @@
# afterBuild: [steps] # afterBuild: [steps]
# Additional steps to run after build.sh/cmd # Additional steps to run after build.sh/cmd
# artifacts: [array] # artifacts: [array]
# name: string
# The name of the artifact container
# - path: string # - path: string
# The file path to artifacts output # The file path to artifacts output
# includeForks: boolean # includeForks: boolean
# Should artifacts from forks be published # Should artifacts from forks be published?
# name: string # publishOnError: boolean
# The name of the artifact container # Should artifacts be published if previous step failed?
# variables: { string: string }
# A map of custom variables
# matrix: { string: { string: string } }
# A map of matrix configurations and variables. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job
# dependsOn: string | [ string ] # dependsOn: string | [ string ]
# For fan-out/fan-in. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job # For fan-out/fan-in. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job
# condition: string # condition: string
@ -48,20 +42,16 @@
parameters: parameters:
agentOs: 'Windows' agentOs: 'Windows'
poolName: ''
poolVmImage: ''
buildArgs: '' buildArgs: ''
configuration: 'Release' configuration: 'Release'
beforeBuild: [] beforeBuild: []
# steps: [] don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.steps)" # steps: [] don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.steps)"
afterBuild: [] afterBuild: []
codeSign: false codeSign: false
variables: {}
dependsOn: '' dependsOn: ''
condition: '' condition: ''
# jobName: '' - use agentOs by default. # jobName: '' - use agentOs by default.
# jobDisplayName: '' - use agentOs by default. # jobDisplayName: '' - use agentOs by default.
# matrix: {} - don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.matrix)"
artifacts: [] artifacts: []
buildDirectory: '' buildDirectory: ''
buildScript: '' buildScript: ''
@ -75,30 +65,33 @@ parameters:
cancelTimeoutInMinutes: 15 cancelTimeoutInMinutes: 15
jobs: jobs:
- job: ${{ coalesce(parameters.jobName, parameters.agentOs) }} - template: /eng/common/templates/job/job.yml
parameters:
name: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }} displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }}
dependsOn: ${{ parameters.dependsOn }} dependsOn: ${{ parameters.dependsOn }}
${{ if ne(parameters.condition, '') }}: ${{ if ne(parameters.condition, '') }}:
condition: ${{ parameters.condition }} condition: ${{ parameters.condition }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }}
${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }}:
enableMicrobuild: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
enablePublishTestResults: true # publish test results to AzDO (populates AzDO Tests tab)
enableTelemetry: true
helixRepo: aspnet/AspNetCore
helixType: build.product/
workspace: workspace:
clean: all clean: all
strategy:
${{ if ne(parameters.matrix, '') }}:
maxParallel: 8
matrix: ${{ parameters.matrix }}
# Map friendly OS names to the right queue # Map friendly OS names to the right queue
# See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md # See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
pool: pool:
${{ if ne(parameters.poolVmImage, '') }}: ${{ if eq(parameters.agentOs, 'macOS') }}:
vmImage: ${{ parameters.poolVmImage }}
${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'macOS')) }}:
vmImage: macOS-10.13 vmImage: macOS-10.13
${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'Linux')) }}: ${{ if eq(parameters.agentOs, 'Linux') }}:
vmImage: ubuntu-16.04 vmImage: ubuntu-16.04
${{ if ne(parameters.poolName, '') }}: ${{ if eq(parameters.agentOs, 'Windows') }}:
name: ${{ parameters.poolName }}
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}:
${{ if eq(variables['System.TeamProject'], 'public') }}: ${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCorePublic-Pool name: NetCorePublic-Pool
${{ if ne(parameters.isTestingJob, true) }}: ${{ if ne(parameters.isTestingJob, true) }}:
@ -112,25 +105,24 @@ jobs:
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing # Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
queue: BuildPool.Windows.10.Amd64.VS2019 queue: BuildPool.Windows.10.Amd64.VS2019
variables: variables:
AgentOsName: ${{ parameters.agentOs }} - AgentOsName: ${{ parameters.agentOs }}
ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping - ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping
DOTNET_HOME: $(Build.SourcesDirectory)/.dotnet - BuildScript: ${{ parameters.buildScript }}
BuildScript: ${{ parameters.buildScript }} - BuildScriptArgs: ${{ parameters.buildArgs }}
BuildScriptArgs: ${{ parameters.buildArgs }} - _BuildConfig: ${{ parameters.configuration }}
BuildConfiguration: ${{ parameters.configuration }} - BuildConfiguration: ${{ parameters.configuration }}
BuildDirectory: ${{ parameters.buildDirectory }} - BuildDirectory: ${{ parameters.buildDirectory }}
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
TeamName: AspNetCore - TeamName: AspNetCore
${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}: - ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}:
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk\win-x64 - JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk\win-x64
${{ if or(ne(parameters.codeSign, true), ne(variables['System.TeamProject'], 'internal')) }}: - ${{ if or(ne(parameters.codeSign, true), ne(variables['System.TeamProject'], 'internal')) }}:
_SignType: '' - _SignType: ''
${{ if and(eq(parameters.codeSign, true), eq(variables['System.TeamProject'], 'internal')) }}: - ${{ if and(eq(parameters.codeSign, true), eq(variables['System.TeamProject'], 'internal')) }}:
${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
_SignType: real - _SignType: real
${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
_SignType: test - _SignType: test
${{ insert }}: ${{ parameters.variables }}
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
@ -154,14 +146,6 @@ jobs:
Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(BuildDirectory)\artifacts\tmp\selenium\" Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(BuildDirectory)\artifacts\tmp\selenium\"
./eng/scripts/InstallGoogleChrome.ps1 ./eng/scripts/InstallGoogleChrome.ps1
displayName: Install Chrome displayName: Install Chrome
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }}:
- task: MicroBuildSigningPlugin@1
displayName: Install MicroBuild Signing plugin
condition: and(succeeded(), in(variables['_SignType'], 'test', 'real'))
inputs:
signType: $(_SignType)
zipSources: false
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
- ${{ parameters.beforeBuild }} - ${{ parameters.beforeBuild }}
@ -211,7 +195,7 @@ jobs:
- ${{ if eq(parameters.isTestingJob, true) }}: - ${{ if eq(parameters.isTestingJob, true) }}:
- task: PublishTestResults@2 - task: PublishTestResults@2
displayName: Publish test results displayName: Publish VSTest test results
condition: always() condition: always()
continueOnError: true continueOnError: true
inputs: inputs:
@ -221,17 +205,6 @@ jobs:
mergeTestResults: true mergeTestResults: true
buildConfiguration: $(BuildConfiguration) buildConfiguration: $(BuildConfiguration)
buildPlatform: $(AgentOsName) buildPlatform: $(AgentOsName)
- task: PublishTestResults@2
displayName: Publish test results
condition: always()
continueOnError: true
inputs:
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
testRunner: xunit
testResultsFiles: '**/artifacts/TestResults/**/*.xml'
mergeTestResults: true
buildConfiguration: $(BuildConfiguration)
buildPlatform: $(AgentOsName)
- task: PublishTestResults@2 - task: PublishTestResults@2
displayName: Publish js test results displayName: Publish js test results
condition: always() condition: always()
@ -248,9 +221,3 @@ jobs:
testResultsFiles: '**/TEST-com.microsoft.signalr*.xml' testResultsFiles: '**/TEST-com.microsoft.signalr*.xml'
buildConfiguration: $(BuildConfiguration) buildConfiguration: $(BuildConfiguration)
buildPlatform: $(AgentOsName) buildPlatform: $(AgentOsName)
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }}:
- task: MicroBuildCleanup@1
displayName: Cleanup MicroBuild tasks
condition: always()

View File

@ -21,6 +21,15 @@
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject> <IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject>
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject> <IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
<IsShipping Condition="'$(IsSampleProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsUnitTestProject)' == 'true'">false</IsShipping> <IsShipping Condition="'$(IsSampleProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsUnitTestProject)' == 'true'">false</IsShipping>
<!--
Following logic mimics core-setup approach as well as
https://github.com/dotnet/arcade/blob/694d59f090b743f894779d04a7ffe11cbaf352e7/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj#L30-L31
$(DotNetFinalVersionKind) is set globally when doing final aka stable builds. Arcade infrastructure should pick
up $(IsStableBuild) automatically; property is also used to control prerelease branding.
-->
<IsStableBuild>false</IsStableBuild>
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>
</PropertyGroup> </PropertyGroup>
<Import Project="eng\FlakyTests.BeforeArcade.props" /> <Import Project="eng\FlakyTests.BeforeArcade.props" />
@ -119,7 +128,7 @@
<BuildProjectReferences Condition=" '$(NoBuild)' == 'true' ">false</BuildProjectReferences> <BuildProjectReferences Condition=" '$(NoBuild)' == 'true' ">false</BuildProjectReferences>
</PropertyGroup> </PropertyGroup>
<!-- Artifacts layout --> <!-- Artifacts layout. Keep these values consistent with items defined in eng/Publishing.props. -->
<PropertyGroup> <PropertyGroup>
<InstallersOutputPath>$(ArtifactsDir)installers\$(Configuration)\</InstallersOutputPath> <InstallersOutputPath>$(ArtifactsDir)installers\$(Configuration)\</InstallersOutputPath>
<SymbolsOutputPath>$(ArtifactsDir)symbols\$(Configuration)\</SymbolsOutputPath> <SymbolsOutputPath>$(ArtifactsDir)symbols\$(Configuration)\</SymbolsOutputPath>

View File

@ -30,7 +30,8 @@
<PropertyGroup Label="Versioning settings"> <PropertyGroup Label="Versioning settings">
<!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" --> <!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" -->
<BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix> <BrandingVersionSuffix />
<BrandingVersionSuffix Condition="$(IncludePreReleaseLabelInPackageVersion)">$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix>
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion> <PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
<PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion> <PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>

View File

@ -266,6 +266,10 @@ if [ -z "$configuration" ]; then
fi fi
msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration" msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration"
# Set verbosity
echo "Setting msbuild verbosity to $verbosity"
msbuild_args[${#msbuild_args[*]}]="-verbosity:$verbosity"
# Initialize global variables need to be set before the import of Arcade is imported # Initialize global variables need to be set before the import of Arcade is imported
restore=$run_restore restore=$run_restore

View File

@ -124,6 +124,7 @@ docker build "$(dirname "$dockerfile")" \
--build-arg "USER=$(whoami)" \ --build-arg "USER=$(whoami)" \
--build-arg "USER_ID=$(id -u)" \ --build-arg "USER_ID=$(id -u)" \
--build-arg "GROUP_ID=$(id -g)" \ --build-arg "GROUP_ID=$(id -g)" \
--build-arg "WORKDIR=$DIR" \
--tag $tagname \ --tag $tagname \
-f "$dockerfile" -f "$dockerfile"
@ -138,7 +139,7 @@ docker run \
-e BUILD_SOURCEBRANCH \ -e BUILD_SOURCEBRANCH \
-e DOTNET_CLI_TELEMETRY_OPTOUT \ -e DOTNET_CLI_TELEMETRY_OPTOUT \
-e Configuration \ -e Configuration \
-v "$DIR:/code/build" \ -v "$DIR:$DIR" \
${docker_args[@]+"${docker_args[@]}"} \ ${docker_args[@]+"${docker_args[@]}"} \
$tagname \ $tagname \
./build.sh \ ./build.sh \

View File

@ -3,6 +3,8 @@ Artifacts
Building this repo produces build artifacts in the directory structure described below. Build outputs are organized into logical groups based on artifact type and the intended usage of the artifacts. Building this repo produces build artifacts in the directory structure described below. Build outputs are organized into logical groups based on artifact type and the intended usage of the artifacts.
See also https://github.com/dotnet/arcade/blob/master/Documentation/ArcadeSdk.md This repo follows _most_ of the conventions described there.
``` ```
artifacts/ artifacts/
installers/ installers/
@ -10,6 +12,14 @@ artifacts/
*.msi = Windows installers *.msi = Windows installers
*.deb, *.rpm = Linux installers *.deb, *.rpm = Linux installers
*.zip, *.tar.gz = archives versions of installers *.zip, *.tar.gz = archives versions of installers
log/
runningProcesses*.txt = Process list from just before build completed
runningProcesses*.bak = Process list from two minutes before runningProcesses*.txt files were written
*.binlog = Binary logs for a few build phases e.g. site extension build
**/
*.log = Log files for test runs and individual tests
$(Configuration)/
*.binlog = Binary logs for most build phases
packages/ packages/
$(Configuration)/ $(Configuration)/
Shipping/ = Packages which are intended for use by customers. These, along with installers, represent the 'product'. Shipping/ = Packages which are intended for use by customers. These, along with installers, represent the 'product'.
@ -18,7 +28,11 @@ artifacts/
*.tgz = NPM packages which ship to npmjs.org *.tgz = NPM packages which ship to npmjs.org
NonShipping/ NonShipping/
*.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers. *.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers.
symbols/
$(Configuration)/
$(TargetFramework)/
*.pdb = Loose symbol files for symbol server publication. Special cases where *.symbols.nupkg packaging is cumbersome.
VSSetup/ VSSetup/
$(Configuration)/ $(Configuration)/
*.vsix = Visual Studio extensions *.vsix = Visual Studio extensions. None currently exist.
``` ```

View File

@ -17,15 +17,4 @@
SharedFrameworkTargetFramework="netcoreapp$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)" /> SharedFrameworkTargetFramework="netcoreapp$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)" />
</Target> </Target>
<Target Name="GenerateBuildAssetManifest" AfterTargets="Pack" Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(DotNetBuildFromSource)' != 'true'">
<!-- Generate build manifests. These manifests are used by Maestro and the Build Asset Registry to flow dependencies to other repos. -->
<MSBuild Projects="$(MSBuildThisFileDirectory)tools\Maestro\Maestro.csproj"
Targets="Restore"
Properties="__DummyTarget=Restore" />
<MSBuild Projects="$(MSBuildThisFileDirectory)tools\Maestro\Maestro.csproj"
Targets="GenerateBuildAssetManifest"
Properties="__DummyTarget=GenerateBuildAssetManifest" />
</Target>
</Project> </Project>

56
eng/Publishing.props Normal file
View File

@ -0,0 +1,56 @@
<Project>
<PropertyGroup Condition=" HasTrailingSlash('$(ArtifactsDir)') ">
<!-- The one use of ArtifactsDir in Publish.proj adds an additional slash, confusing itself. -->
<ArtifactsDir>$(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1))))</ArtifactsDir>
<PublishDependsOnTargets>$(PublishDependsOnTargets);_PublishInstallers</PublishDependsOnTargets>
<_UploadPathRoot>aspnetcore</_UploadPathRoot>
</PropertyGroup>
<!-- $(InstallersOutputPath) and $(SymbolsOutputPath) are not defined. Root Directory.Build.props is not imported. -->
<ItemGroup>
<!-- Include our "loose" PDBs when publishing symbols. -->
<FilesToPublishToSymbolServer Include="$(ArtifactsDir)\symbols\**\*.pdb" />
<!-- Prepare for _PublishInstallers target. -->
<_InstallersToPublish Remove="@(_InstallersToPublish)" />
<_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.jar" UploadPathSegment="jar" />
<_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.pom" UploadPathSegment="jar" />
<_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.tgz" UploadPathSegment="npm" />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.deb" UploadPathSegment="Runtime" />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.exe" UploadPathSegment="Runtime" />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.msi" UploadPathSegment="Runtime" />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.rpm" UploadPathSegment="Runtime" />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.tar.gz" UploadPathSegment="Runtime" />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.version" UploadPathSegment="Runtime"
Condition=" '$(PublishInstallerBaseVersion)' == 'true' " />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.wixlib" UploadPathSegment="Runtime" />
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.zip" UploadPathSegment="Runtime" />
</ItemGroup>
<Target Name="_PublishInstallers">
<!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. -->
<MSBuild Projects="$(RepoRoot)src\Mvc\Mvc\src\Microsoft.AspNetCore.Mvc.csproj"
Targets="_GetPackageVersionInfo"
SkipNonexistentProjects="false">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />
</MSBuild>
<PropertyGroup>
<_PackageVersion>@(_ResolvedPackageVersionInfo->'%(PackageVersion)')</_PackageVersion>
</PropertyGroup>
<ItemGroup>
<!-- Do not push .nupkg files from Linux and macOS builds. They'll be packed up separately and signed on Windows. -->
<ItemsToPushToBlobFeed Remove="@(ItemsToPushToBlobFeed)" Condition="'$(OS)' != 'Windows_NT'" />
<ItemsToPushToBlobFeed Include="@(_InstallersToPublish)">
<IsShipping>false</IsShipping>
<ManifestArtifactData>NonShipping=true;ShipInstaller=dotnetcli</ManifestArtifactData>
<PublishFlatContainer>true</PublishFlatContainer>
<RelativeBlobPath>$(_UploadPathRoot)/%(_InstallersToPublish.UploadPathSegment)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath>
</ItemsToPushToBlobFeed>
</ItemGroup>
</Target>
</Project>

View File

@ -0,0 +1,4 @@
apphost.exe;; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it.
.js;; We do not sign JavaScript files.
.binlog;; MSBuild binary logs are not signed though they are sometimes placed where validation thinks they should be.
WixUIWixca|WixDepCA;; We do not sign WiX content in our installers.

View File

@ -21,6 +21,7 @@
--> -->
<FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" /> <FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" />
<FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="Microsoft400" /> <FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="Microsoft400" />
<FileExtensionSignInfo Include=".dll;.exe" CertificateName="Microsoft400" />
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" /> <FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" /> <FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
<FileExtensionSignInfo Include=".zip" CertificateName="None" /> <FileExtensionSignInfo Include=".zip" CertificateName="None" />

View File

@ -412,15 +412,15 @@
<Uri>https://github.com/aspnet/Extensions</Uri> <Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>73c259904d5db01bbeede15df2a72d1b94cb3306</Sha> <Sha>73c259904d5db01bbeede15df2a72d1b94cb3306</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19456.10"> <Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19458.2">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha> <Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19456.10"> <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19458.2">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha> <Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19456.10"> <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19458.2">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha> <Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha>
</Dependency> </Dependency>

View File

@ -10,8 +10,10 @@
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion> <AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>0</AspNetCorePatchVersion> <AspNetCorePatchVersion>0</AspNetCorePatchVersion>
<PreReleasePreviewNumber>2</PreReleasePreviewNumber> <PreReleasePreviewNumber>2</PreReleasePreviewNumber>
<PreReleaseVersionLabel>rc$(PreReleasePreviewNumber)</PreReleaseVersionLabel> <IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
<PreReleaseBrandingLabel>Release Candidate $(PreReleasePreviewNumber)</PreReleaseBrandingLabel> <IncludePreReleaseLabelInPackageVersion Condition=" '$(IsStableBuild)' == 'true' ">false</IncludePreReleaseLabelInPackageVersion>
<PreReleaseVersionLabel Condition="$(IncludePreReleaseLabelInPackageVersion)">rc$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
<PreReleaseBrandingLabel Condition="$(IncludePreReleaseLabelInPackageVersion)">Release Candidate $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
<!-- Blazor Client packages will not RTM with 3.0 --> <!-- Blazor Client packages will not RTM with 3.0 -->
<BlazorClientPreReleasePreviewNumber>9</BlazorClientPreReleasePreviewNumber> <BlazorClientPreReleasePreviewNumber>9</BlazorClientPreReleasePreviewNumber>
<BlazorClientPreReleaseVersionLabel>preview$(BlazorClientPreReleasePreviewNumber)</BlazorClientPreReleaseVersionLabel> <BlazorClientPreReleaseVersionLabel>preview$(BlazorClientPreReleasePreviewNumber)</BlazorClientPreReleaseVersionLabel>
@ -53,7 +55,7 @@
--> -->
<PropertyGroup Label="Automated"> <PropertyGroup Label="Automated">
<!-- Packages from dotnet/arcade --> <!-- Packages from dotnet/arcade -->
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19456.10</MicrosoftDotNetGenAPIPackageVersion> <MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19458.2</MicrosoftDotNetGenAPIPackageVersion>
<!-- Packages from dotnet/roslyn --> <!-- Packages from dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>3.3.1-beta3-19454-05</MicrosoftNetCompilersToolsetPackageVersion> <MicrosoftNetCompilersToolsetPackageVersion>3.3.1-beta3-19454-05</MicrosoftNetCompilersToolsetPackageVersion>
<!-- Packages from dotnet/core-setup --> <!-- Packages from dotnet/core-setup -->

View File

@ -2,8 +2,9 @@ FROM microsoft/dotnet:2.1.0-preview1-runtime-deps-alpine
ARG USER ARG USER
ARG USER_ID ARG USER_ID
ARG GROUP_ID ARG GROUP_ID
ARG WORKDIR
WORKDIR /code/build WORKDIR ${WORKDIR}
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER" RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
ENV HOME "/home/$USER" ENV HOME "/home/$USER"

View File

@ -3,8 +3,9 @@ FROM microsoft/dotnet:2.1-runtime-deps-bionic
ARG USER ARG USER
ARG USER_ID ARG USER_ID
ARG GROUP_ID ARG GROUP_ID
ARG WORKDIR
WORKDIR /code/build WORKDIR ${WORKDIR}
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER" RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
ENV HOME "/home/$USER" ENV HOME "/home/$USER"

View File

@ -5,8 +5,9 @@ FROM mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-e1b4a89-201753110
ARG USER ARG USER
ARG USER_ID ARG USER_ID
ARG GROUP_ID ARG GROUP_ID
ARG WORKDIR
WORKDIR /code/build WORKDIR ${WORKDIR}
RUN useradd -m ${USER} --uid ${USER_ID} -g root RUN useradd -m ${USER} --uid ${USER_ID} -g root
RUN echo '${USER} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN echo '${USER} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

View File

@ -2,8 +2,9 @@ FROM mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine
ARG USER ARG USER
ARG USER_ID ARG USER_ID
ARG GROUP_ID ARG GROUP_ID
ARG WORKDIR
WORKDIR /code/build WORKDIR ${WORKDIR}
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER" RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
ENV HOME "/home/$USER" ENV HOME "/home/$USER"

5
eng/empty.proj Normal file
View File

@ -0,0 +1,5 @@
<!-- eng\common\build.ps1 fails without a project to build, so we give it this empty project to satisfy its desires -->
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
</Project>

View File

@ -1,38 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- TFM doesn't matter. These settings are required to make NuGet happy so we can restore required MSBuild packages. -->
<TargetFramework>netcoreapp3.0</TargetFramework>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<ManifestsPath>$(ArtifactsDir)manifests\</ManifestsPath>
<DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19061.6" />
</ItemGroup>
<Target Name="GetFilesToPublish">
<ItemGroup>
<PackageToPublish Include="$(ArtifactsShippingPackagesDir)*.nupkg" />
<PackageToPublish Include="$(ArtifactsNonShippingPackagesDir)*.nupkg">
<!-- 'NonShipping' packages are used to transfer bits to partner teams, and should not be used by customers. -->
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
</PackageToPublish>
</ItemGroup>
</Target>
<Target Name="GenerateBuildAssetManifest"
DependsOnTargets="GetFilesToPublish">
<GenerateBuildManifest
Artifacts="@(PackageToPublish)"
OutputPath="$(ManifestsPath)aspnetcore-$(TargetRuntimeIdentifier)-$(PackageVersion).xml"
BuildId="$(PackageVersion)"
BuildData="Location=https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json"
RepoUri="$(RepositoryUrl)"
RepoBranch="$(BUILD_SOURCEBRANCH)"
RepoCommit="$(BUILD_SOURCEVERSION)" />
</Target>
</Project>

View File

@ -1,38 +0,0 @@
<!--
Code signing of .nupkg's built on Linux/macOS cannot be code-signed on the same machine which built the package.
This project takes as inputs a folder of *.nupkg packages and code signs them using MicroBuild.
Note: because Authenticode signing of .dll's is not something Linux and macOS can verify anyways, this signing
process only code-signs the .nupkg itself, not the contents.
-->
<Project DefaultTargets="Build" InitialTargets="CheckForRequiredProperties">
<PropertyGroup>
<SignType>$([MSBuild]::ValueOrDefault($(SignType),'real'))</SignType>
</PropertyGroup>
<Import Project="..\..\..\Directory.Build.props" />
<Import Project="..\..\targets\MicroBuild.Plugin.props" Condition="'$(MicroBuildSentinelFile)' == ''" />
<Import Project="$(MicroBuildPluginDirectory)\MicroBuild.Plugins.*\**\build\MicroBuild.Plugins.*.props" Condition=" '$(MicroBuildPluginDirectory)' != ''" />
<PropertyGroup Condition="'$(DirectoryToSign)' != ''">
<OutDir>$([MSBuild]::NormalizeDirectory($(DirectoryToSign)))</OutDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup Condition="'$(OutDir)' != ''">
<SymbolsPackages Include="$(OutDir)**\*.symbols.nupkg" />
<FilesToSign Include="$(OutDir)**\*.nupkg">
<Authenticode>NuGet</Authenticode>
</FilesToSign>
</ItemGroup>
<Target Name="CheckForRequiredProperties">
<Error Text="Missing required property: DirectoryToSign" Condition="'$(DirectoryToSign)' == ''"/>
<Error Text="Could not find any packages to sign in $(DirectoryToSign)" Condition="@(FilesToSign->Count()) == 0"/>
</Target>
<!-- MicroBuild code-signing chains onto this target. -->
<Target Name="AfterBuild" />
<Target Name="Build" DependsOnTargets="AfterBuild" />
<Import Project="$(MicroBuildPluginDirectory)\MicroBuild.Plugins.*\**\build\MicroBuild.Plugins.*.targets" Condition=" '$(MicroBuildPluginDirectory)' != ''" />
</Project>

View File

@ -1,15 +0,0 @@
@ECHO OFF
SET DirToSign=%1
IF "%DirToSign%"=="" (
echo Error^: Expected argument ^<DirToSign^>
echo Usage^: sign-packages.cmd ^<DirToSign^>
exit /b 1
)
SET RepoRoot=%~dp0..\..\..
SET Project=%~dp0XplatPackageSigner.proj
%RepoRoot%\build.cmd -NoRestore -projects %project% /p:DirectoryToSign=%DirToSign% /bl:%RepoRoot%\artifacts\log\XplatSign.binlog

View File

@ -24,7 +24,7 @@
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Yarn.MSBuild": "1.15.2", "Yarn.MSBuild": "1.15.2",
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19456.10", "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19458.2",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19456.10" "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19458.2"
} }
} }

View File

@ -4,6 +4,6 @@
<PropertyGroup> <PropertyGroup>
<!-- Override prerelease label and use preview 9, even in the final build --> <!-- Override prerelease label and use preview 9, even in the final build -->
<PreReleaseVersionLabel>$(BlazorClientPreReleaseVersionLabel)</PreReleaseVersionLabel> <PreReleaseVersionLabel>$(BlazorClientPreReleaseVersionLabel)</PreReleaseVersionLabel>
<DotNetFinalVersionKind></DotNetFinalVersionKind> <DotNetFinalVersionKind />
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -16,8 +16,13 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
// Compare to https://github.com/aspnet/BuildTools/blob/314c98e4533217a841ff9767bb38e144eb6c93e4/tools/KoreBuild.Console/Commands/CommandContext.cs#L76 // Compare to https://github.com/aspnet/BuildTools/blob/314c98e4533217a841ff9767bb38e144eb6c93e4/tools/KoreBuild.Console/Commands/CommandContext.cs#L76
public static string GetDotNetHome() public static string GetDotNetHome()
{ {
// runtest.* scripts throughout the repo define $env:DOTNET_HOME
var dotnetHome = Environment.GetEnvironmentVariable("DOTNET_HOME"); var dotnetHome = Environment.GetEnvironmentVariable("DOTNET_HOME");
// /activate.* and runtest.* scripts define $env:DOTNET_ROOT and (for /activate.*) $env:{DOTNET_ROOT(x86)}
var dotnetRoot = Environment.GetEnvironmentVariable("DOTNET_ROOT"); var dotnetRoot = Environment.GetEnvironmentVariable("DOTNET_ROOT");
// /eng/common/tools.* scripts define $env:DOTNET_INSTALL_DIR
var dotnetInstallDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR");
var userProfile = Environment.GetEnvironmentVariable("USERPROFILE"); var userProfile = Environment.GetEnvironmentVariable("USERPROFILE");
var home = Environment.GetEnvironmentVariable("HOME"); var home = Environment.GetEnvironmentVariable("HOME");
@ -27,9 +32,20 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
result = dotnetHome; result = dotnetHome;
} }
else if (!string.IsNullOrEmpty(dotnetRoot)) else if (!string.IsNullOrEmpty(dotnetRoot))
{
if (dotnetRoot.EndsWith("x64"))
{ {
// DOTNET_ROOT has x64 appended to the path, which we append again in GetDotNetInstallDir // DOTNET_ROOT has x64 appended to the path, which we append again in GetDotNetInstallDir
result = dotnetRoot.Substring(0, dotnetRoot.Length - 3); result = dotnetRoot[0..^3];
}
else
{
result = dotnetRoot;
}
}
else if (!string.IsNullOrEmpty(dotnetInstallDir))
{
result = dotnetInstallDir;
} }
else if (!string.IsNullOrEmpty(userProfile)) else if (!string.IsNullOrEmpty(userProfile))
{ {
@ -46,9 +62,10 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
public static string GetDotNetInstallDir(RuntimeArchitecture arch) public static string GetDotNetInstallDir(RuntimeArchitecture arch)
{ {
var dotnetDir = DotNetHome; var dotnetDir = DotNetHome;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) var archSpecificDir = Path.Combine(dotnetDir, arch.ToString());
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Directory.Exists(archSpecificDir))
{ {
dotnetDir = Path.Combine(dotnetDir, arch.ToString()); dotnetDir = archSpecificDir;
} }
return dotnetDir; return dotnetDir;