未验证 提交 ab1e1563 编写于 作者: M Matt Mitchell 提交者: GitHub

Clean up yaml and add internal runtime download (#4805)

上级 920b0b06
#
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
#
parameters:
name: ''
# send telemetry
enableTelemetry: true
# install Microbuild plugin if not a public build
enableMicrobuild: true
# queue YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#queue
queue: {}
# variables YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#phase
variables: {}
# run this build as a public build, even in the internal project
runAsPublic: false
# Common conditionals: There are a number of common conditionals that are useful. Generally these are used to decide what resources can be accessed,
# or what logic should be applied based on the context the build is being run in.
# - eq/ne(variables['Agent.Os'], 'Windows_NT') - Running/not running on a windows machine
# - eq/ne(variables['System.TeamProject'], 'public') - Running/not running on the dotnet public VSTS project
# - and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest') - Not running in public and not a pull request.
# - or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest') - Running in public or a pull request.
phases:
- template: /eng/common/templates/phases/base.yml
parameters:
enableTelemetry: ${{ parameters.enableTelemetry }}
enableMicrobuild: ${{ parameters.enableMicrobuild }}
name: ${{ parameters.name }}
queue: ${{ parameters.queue }}
runAsPublic: ${{ parameters.runAsPublic }}
variables:
${{ insert }}: ${{ parameters.variables }}
_HelixBuildConfig: $(_BuildConfig)
# Only enable publishing in non-public, non PR scenarios.
${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# This should be changed to an isolated blob feed per-build.
# Right now a manual build of a random branch would get published alongside the normal branch artifacts.
_PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
_PublishArgs: /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
_OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
# else
${{ if or(eq(parameters.runAsPublic, 'true'), eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
_PublishArgs: ''
_OfficialBuildIdArgs: ''
_SignArgs: ''
steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: AzureKeyVault@1
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnetfeed-storage-access-key-1,microsoft-symbol-server-pat,symweb-symbol-server-pat'
# Use utility script to run script command dependent on agent OS.
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_PublishArgs)
$(_SignArgs)
$(_OfficialBuildIdArgs)
/p:Platform=$(_Platform) /p:IsShipping=$(_IsShipping)
displayName: Windows Build / Publish
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
ArtifactName: $(Agent.Os)_$(Agent.JobName)
continueOnError: true
condition: always()
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true
condition: always()
\ No newline at end of file
......@@ -47,12 +47,6 @@ jobs:
value: real
- name: _SignArgs
value: ''
# needed for darc (dependency flow) publishing
- name: _PublishType
value: none
- name: _DotNetPublishToBlobFeed
value: false
- name: _PublishArgs
value: ''
- name: _OfficialBuildIdArgs
......@@ -73,24 +67,26 @@ jobs:
value: ''
- name: _HelixCreator
value: ${{ parameters.repoName }}
- name: _InternalRuntimeDownloadArgs
value: ''
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
- name: _InternalRuntimeDownloadArgs
value: ''
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNet-MSRC-Storage
- group: AzureDevOps-Artifact-Feeds-Pats
- name: _InternalRuntimeDownloadArgs
value: >-
/p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet
/p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64)
# Override some values if we're building internally
- ${{ if eq(parameters.runAsPublic, 'false') }}:
# note: You have to use list syntax here (- name: value) or you will get errors about declaring the same variable multiple times
- name: _PublishType
value: blob
- name: _SignType
value: real
- name: _DotNetPublishToBlobFeed
value: true
- group: DotNet-Blob-Feed
- group: DotNet-Symbol-Server-Pats
- group: DotNet-HelixApi-Access
- name: _PublishBlobFeedUrl
value: https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json
# note: Even though they are referenced here, user defined variables (like $(_SignType)) are not resolved
# until the agent is running on the machine. They can be overridden any time before they are resolved,
......@@ -98,13 +94,8 @@ jobs:
- name: _SignArgs
value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
- name: _PublishArgs
value: /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
value:
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
- name: _OfficialBuildIdArgs
value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
- name: _PublicBuildPipeline
......@@ -117,10 +108,6 @@ jobs:
value: '' #if _HelixToken is set, Creator must be empty
- name: _TestHelixAgentPool
value: 'Windows.10.Amd64.ClientRS5' # Preferred: 'Windows.10.Amd64%3bWindows.7.Amd64%3bWindows.10.Amd64.ClientRS5'
- group: DotNet-MSRC-Storage
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet
/p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64)
strategy:
matrix:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册