-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/2.1' into release/2.2
- Loading branch information
Showing
6 changed files
with
152 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details | ||
# | ||
|
||
# Only run CI builds for these branches | ||
trigger: | ||
branches: | ||
include: | ||
- 'master' | ||
- 'release/*' | ||
# Run PR validation on all branches | ||
pr: | ||
branches: | ||
include: | ||
- '*' | ||
|
||
name: $(Date:yyMMdd)-$(Rev:rr) | ||
|
||
jobs: | ||
- template: eng/templates/default-build.yml | ||
parameters: | ||
agentOs: Windows | ||
configuration: Release | ||
codeSign: true | ||
buildArgs: | | ||
'/p:PublishBlobFeedKey=$(PB_PublishBlobFeedKey)' | ||
artifacts: | ||
publish: true | ||
name: packages | ||
path: artifacts/Release/packages/ | ||
|
||
- template: eng/templates/default-build.yml | ||
parameters: | ||
agentOs: macOS | ||
configuration: Release | ||
|
||
- template: eng/templates/default-build.yml | ||
parameters: | ||
agentOs: Linux | ||
configuration: Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# default-build.yml | ||
# | ||
# Description: Defines a build phase for invoking build.sh/cmd | ||
# | ||
# Parameters: | ||
# configuration: string | ||
# Release or Debug | ||
# agentOs: string | ||
# Used in templates to define variables which are OS specific. Typically from the set { Windows, Linux, macOS } | ||
# buildArgs: string | ||
# Additional arguments to pass to the build.sh/cmd script. | ||
# Note: -ci is always passed | ||
# artifacts: | ||
# publish: boolean | ||
# Should artifacts be published | ||
# path: string | ||
# The file path to artifacts output | ||
# name: string | ||
# The name of the artifact container | ||
# codeSign: boolean | ||
# This build definition is enabled for code signing. (Only applies to Windows) | ||
|
||
# | ||
# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details | ||
# | ||
|
||
parameters: | ||
agentOs: 'Windows' | ||
poolName: '' | ||
buildArgs: '' | ||
configuration: 'Release' | ||
codeSign: false | ||
artifacts: | ||
publish: false | ||
name: '' | ||
path: 'artifacts/' | ||
|
||
jobs: | ||
- job: ${{ parameters.agentOs }} | ||
workspace: | ||
clean: all | ||
# Map friendly OS names to the right queue | ||
# See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md | ||
pool: | ||
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'macOS')) }}: | ||
name: Hosted macOS | ||
vmImage: macOS-10.13 | ||
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Linux')) }}: | ||
name: Hosted Ubuntu 1604 | ||
vmImage: ubuntu-16.04 | ||
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}: | ||
${{ if ne(variables['System.TeamProject'], 'internal') }}: | ||
name: Hosted VS2017 | ||
vmImage: vs2017-win2016 | ||
${{ if eq(variables['System.TeamProject'], 'internal') }}: | ||
name: dotnet-internal-temp | ||
variables: | ||
AgentOsName: ${{ parameters.agentOs }} | ||
ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping | ||
DOTNET_HOME: $(Agent.WorkFolder)/.dotnet | ||
BuildScriptArgs: ${{ parameters.buildArgs }} | ||
BuildConfiguration: ${{ parameters.configuration }} | ||
VSTS_OVERWRITE_TEMP: false # Workaround for https://github.com/dotnet/core-eng/issues/2812 | ||
${{ if or(ne(parameters.codeSign, 'true'), ne(variables['System.TeamProject'], 'internal')) }}: | ||
_SignType: | ||
${{ if and(eq(parameters.codeSign, 'true'), eq(variables['System.TeamProject'], 'internal')) }}: | ||
TeamName: AspNetCore | ||
_SignType: real | ||
steps: | ||
- checkout: self | ||
clean: true | ||
- ${{ 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 | ||
- ${{ if eq(parameters.agentOs, 'Windows') }}: | ||
- script: .\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) | ||
displayName: Run build.cmd | ||
- ${{ if ne(parameters.agentOs, 'Windows') }}: | ||
- script: ./build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) | ||
displayName: Run build.sh | ||
- task: PublishTestResults@2 | ||
displayName: Publish test results | ||
condition: always() | ||
inputs: | ||
testRunTitle: $(AgentOsName)-$(BuildConfiguration) | ||
testRunner: vstest | ||
testResultsFiles: 'artifacts/logs/**/*.trx' | ||
mergeTestResults: true | ||
- ${{ if eq(parameters.artifacts.publish, 'true') }}: | ||
- task: PublishBuildArtifacts@1 | ||
displayName: Upload artifacts | ||
condition: eq(variables['system.pullrequest.isfork'], false) | ||
inputs: | ||
pathtoPublish: ${{ parameters.artifacts.path }} | ||
${{ if eq(parameters.artifacts.name, '') }}: | ||
artifactName: artifacts-$(AgentOsName)-$(BuildConfiguration) | ||
${{ if ne(parameters.artifacts.name, '') }}: | ||
artifactName: ${{ parameters.artifacts.name }} | ||
artifactType: Container | ||
parallel: true | ||
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }}: | ||
- task: MicroBuildCleanup@1 | ||
displayName: Cleanup MicroBuild tasks | ||
condition: always() |