2019-05-29 23:06:38 +03:00
|
|
|
#
|
|
|
|
# See https://docs.microsoft.com/azure/devops/pipelines/yaml-schema for reference.
|
|
|
|
#
|
|
|
|
|
2018-12-02 03:25:55 +03:00
|
|
|
variables:
|
2019-01-16 02:56:11 +03:00
|
|
|
- name: Build.Repository.Clean
|
|
|
|
value: true
|
|
|
|
- name: _TeamName
|
|
|
|
value: AspNetCore
|
2019-03-01 02:01:52 +03:00
|
|
|
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
|
|
|
|
value: true
|
2022-06-08 23:25:28 +03:00
|
|
|
- name: Codeql.Enabled
|
|
|
|
value: true
|
2019-12-11 00:05:34 +03:00
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
2022-11-09 20:07:52 +03:00
|
|
|
- group: DotNetBuilds storage account read tokens
|
2019-12-11 00:05:34 +03:00
|
|
|
- name: _InternalRuntimeDownloadArgs
|
2022-11-09 20:07:52 +03:00
|
|
|
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
|
|
|
|
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
|
2022-11-22 01:46:22 +03:00
|
|
|
|
|
|
|
- group: DotNet-DevDiv-Insertion-Workflow-Variables
|
|
|
|
- name: _DevDivDropAccessToken
|
|
|
|
value: $(dn-bot-devdiv-drop-rw-code-rw)
|
|
|
|
|
|
|
|
- group: DotNet-Roslyn-Insertion-Variables
|
|
|
|
- name: Razor.GitHubEmail
|
|
|
|
value: dotnet-build-bot@microsoft.com
|
|
|
|
- name: Razor.GitHubToken
|
|
|
|
value: $(AccessToken-dotnet-build-bot-public-repo)
|
|
|
|
- name: Razor.GitHubUserName
|
|
|
|
value: dotnet-build-bot
|
|
|
|
- name: Insertion.CreateDraftPR
|
|
|
|
value: true
|
|
|
|
- name: Insertion.TitlePrefix
|
|
|
|
value: '[Auto Insertion]'
|
|
|
|
- name: Insertion.TitleSuffix
|
|
|
|
value: ''
|
2019-12-11 00:05:34 +03:00
|
|
|
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- name: _InternalRuntimeDownloadArgs
|
|
|
|
value: ''
|
2020-03-07 09:17:29 +03:00
|
|
|
|
2018-12-02 03:25:55 +03:00
|
|
|
trigger:
|
2019-05-29 23:06:38 +03:00
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
2021-03-20 03:30:20 +03:00
|
|
|
- main
|
2021-05-18 19:31:45 +03:00
|
|
|
- main-vs-deps
|
2019-05-29 23:06:38 +03:00
|
|
|
- release/*
|
2019-11-25 22:03:52 +03:00
|
|
|
- internal/release/3.*
|
2018-12-02 03:25:55 +03:00
|
|
|
|
|
|
|
pr:
|
2019-05-29 23:06:38 +03:00
|
|
|
autoCancel: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- '*'
|
2018-12-02 03:25:55 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
stages:
|
|
|
|
- stage: build
|
|
|
|
displayName: Build
|
|
|
|
jobs:
|
2021-06-16 01:42:16 +03:00
|
|
|
- ${{ if and(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
|
2021-06-02 21:14:43 +03:00
|
|
|
- template: /eng/common/templates/job/onelocbuild.yml
|
|
|
|
parameters:
|
2021-06-16 01:42:16 +03:00
|
|
|
LclSource: lclFilesfromPackage
|
|
|
|
LclPackageId: 'LCL-JUNO-PROD-RAZORTOOL'
|
2022-11-09 05:16:47 +03:00
|
|
|
MirrorRepo: razor
|
2021-06-02 21:14:43 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enablePublishBuildArtifacts: false
|
|
|
|
enablePublishTestResults: false
|
|
|
|
enablePublishUsingPipelines: false
|
|
|
|
jobs:
|
2020-04-04 09:15:30 +03:00
|
|
|
# Code check
|
|
|
|
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- job: Code_check
|
|
|
|
displayName: Code check
|
|
|
|
pool:
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
2022-09-01 06:39:52 +03:00
|
|
|
name: NetCore-Public
|
2022-09-28 00:51:24 +03:00
|
|
|
demands: ImageOverride -equals windows.vs2022preview.amd64.open
|
2020-04-04 09:15:30 +03:00
|
|
|
${{ if ne(variables['System.TeamProject'], 'public') }}:
|
2021-10-13 19:51:17 +03:00
|
|
|
name: NetCore1ESPool-Internal
|
2022-09-28 01:46:58 +03:00
|
|
|
demands: ImageOverride -equals windows.vs2022preview.amd64
|
2020-04-04 09:15:30 +03:00
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Install Node 10.x
|
2019-12-11 00:05:34 +03:00
|
|
|
inputs:
|
2020-04-04 09:15:30 +03:00
|
|
|
versionSpec: 10.x
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'Clear NuGet caches'
|
|
|
|
condition: succeeded()
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: 'locals all -clear'
|
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Setup Private Feeds Credentials
|
|
|
|
inputs:
|
|
|
|
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
|
|
|
|
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
|
|
|
|
env:
|
|
|
|
Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
2020-05-11 05:32:33 +03:00
|
|
|
- powershell: ./restore.cmd -msbuildEngine dotnet -ci $(_InternalRuntimeDownloadArgs); ./eng/scripts/CodeCheck.ps1 -ci
|
2020-04-04 09:15:30 +03:00
|
|
|
displayName: Run eng/scripts/CodeCheck.ps1
|
2019-02-19 20:17:05 +03:00
|
|
|
|
2019-05-29 23:06:38 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
# Three jobs for each of the three OSes we want to run on
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enablePublishTestResults: true
|
|
|
|
enableTelemetry: true
|
2022-11-09 05:16:47 +03:00
|
|
|
helixRepo: dotnet/razor
|
2019-07-22 08:17:43 +03:00
|
|
|
helixType: build.product/
|
|
|
|
# enableMicrobuild can't be read from a user-defined variable (Azure DevOps limitation)
|
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
enableMicrobuild: true
|
2022-11-09 20:07:52 +03:00
|
|
|
enablePublishUsingPipelines: true
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
jobs:
|
|
|
|
- job: Windows
|
2022-07-27 06:43:30 +03:00
|
|
|
timeoutInMinutes: 120
|
2019-07-22 08:17:43 +03:00
|
|
|
pool:
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
2022-09-01 06:39:52 +03:00
|
|
|
name: NetCore-Public
|
2022-10-12 00:58:39 +03:00
|
|
|
demands: ImageOverride -equals windows.vs2022preview.scout.amd64.open
|
2019-07-22 08:17:43 +03:00
|
|
|
${{ if ne(variables['System.TeamProject'], 'public') }}:
|
2021-10-13 19:51:17 +03:00
|
|
|
name: NetCore1ESPool-Internal
|
2022-09-28 00:51:24 +03:00
|
|
|
demands: ImageOverride -equals windows.vs2022preview.amd64
|
2019-07-22 08:17:43 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-04-01 20:45:00 +03:00
|
|
|
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
2020-06-08 20:41:02 +03:00
|
|
|
_PublishArgs: ''
|
2020-04-01 20:45:00 +03:00
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
2020-06-08 20:41:02 +03:00
|
|
|
_PublishArgs: ''
|
2020-04-01 20:45:00 +03:00
|
|
|
${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
|
2020-06-08 20:41:02 +03:00
|
|
|
_PublishArgs: ''
|
2020-04-01 20:45:00 +03:00
|
|
|
${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
|
2022-11-09 20:07:52 +03:00
|
|
|
_PublishArgs: /p:DotNetPublishUsingPipelines=true
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
variables:
|
|
|
|
- _BuildArgs: ''
|
2022-04-08 01:22:29 +03:00
|
|
|
- XUNIT_LOGS: '$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)'
|
2022-10-12 00:58:39 +03:00
|
|
|
- __VSNeverShowWhatsNew: 1
|
2019-04-15 00:00:50 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
# Variables for internal Official builds
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- _SignType: real
|
|
|
|
- _BuildArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
|
|
|
|
/p:OfficialBuildId=$(Build.BuildNumber)
|
|
|
|
/p:ManifestBuildBranch=$(Build.SourceBranchName)
|
|
|
|
/p:ManifestBuildNumber=$(Build.BuildNumber)
|
2022-11-22 01:46:22 +03:00
|
|
|
/p:VisualStudioDropName=Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
|
2022-06-30 23:29:32 +03:00
|
|
|
/p:GenerateSbom=true
|
2019-01-16 02:56:11 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
steps:
|
2019-09-20 00:36:19 +03:00
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Install Node 10.x
|
|
|
|
inputs:
|
|
|
|
versionSpec: 10.x
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2020-02-26 00:48:09 +03:00
|
|
|
- powershell: npm install -g yarn
|
|
|
|
displayName: Install yarn
|
|
|
|
condition: succeeded()
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'Clear NuGet caches'
|
|
|
|
condition: succeeded()
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: 'locals all -clear'
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2022-06-30 23:29:32 +03:00
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
2022-07-11 21:46:38 +03:00
|
|
|
- template: /eng/restore-internal-tools.yml
|
2019-09-19 19:36:02 +03:00
|
|
|
|
|
|
|
- powershell: ./eng/scripts/InstallProcDump.ps1
|
|
|
|
displayName: Install ProcDump
|
2022-10-27 20:21:29 +03:00
|
|
|
|
|
|
|
- powershell: ./eng/scripts/StartDumpCollectionForHangingBuilds.ps1
|
|
|
|
$(ProcDumpPath)procdump.exe artifacts/log/$(_BuildConfig)
|
|
|
|
(Get-Date).AddMinutes(60)
|
|
|
|
devenv, xunit.console, xunit.console.x86
|
2019-09-19 19:36:02 +03:00
|
|
|
displayName: Start background dump collection
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-12-11 00:05:34 +03:00
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Setup Private Feeds Credentials
|
|
|
|
inputs:
|
|
|
|
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
|
|
|
|
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
|
|
|
|
env:
|
|
|
|
Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2022-03-28 21:02:43 +03:00
|
|
|
- script: eng\CIBuild.cmd
|
|
|
|
-restore
|
|
|
|
-build
|
|
|
|
-sign
|
|
|
|
-pack
|
|
|
|
-publish
|
2019-07-22 08:17:43 +03:00
|
|
|
-configuration $(_BuildConfig)
|
2020-05-11 05:32:33 +03:00
|
|
|
-msbuildEngine dotnet
|
2019-07-22 08:17:43 +03:00
|
|
|
-prepareMachine
|
|
|
|
$(_BuildArgs)
|
|
|
|
$(_PublishArgs)
|
2019-12-11 00:05:34 +03:00
|
|
|
$(_InternalRuntimeDownloadArgs)
|
2019-07-22 08:17:43 +03:00
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2022-05-13 23:36:06 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Upload Build BinLog
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: artifacts/log/$(_BuildConfig)/Build.binlog
|
|
|
|
artifactName: $(Agent.Os)_$(Agent.JobName) BuildBinLog
|
|
|
|
artifactType: Container
|
|
|
|
parallel: true
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2022-03-28 21:02:43 +03:00
|
|
|
- script: eng\cibuild.cmd
|
2020-05-14 21:40:07 +03:00
|
|
|
-configuration $(_BuildConfig)
|
2022-04-29 20:35:43 +03:00
|
|
|
-msbuildEngine vs
|
2020-05-14 21:40:07 +03:00
|
|
|
-prepareMachine
|
2022-03-28 21:02:43 +03:00
|
|
|
-restore
|
|
|
|
-build
|
|
|
|
-pack
|
2022-03-31 02:29:16 +03:00
|
|
|
-sign
|
2020-05-14 21:40:07 +03:00
|
|
|
/p:BuildVsix=true
|
2020-05-15 03:36:19 +03:00
|
|
|
/p:BuildProjectReferences=false
|
2020-05-14 21:40:07 +03:00
|
|
|
$(_BuildArgs)
|
2019-07-22 08:17:43 +03:00
|
|
|
$(_PublishArgs)
|
2019-12-11 00:05:34 +03:00
|
|
|
$(_InternalRuntimeDownloadArgs)
|
2020-05-14 21:58:40 +03:00
|
|
|
name: Build_Vsix
|
2022-03-28 21:02:43 +03:00
|
|
|
displayName: Build and Deploy Vsix
|
|
|
|
condition: succeeded()
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2022-05-13 23:36:06 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Upload Build VSIX BinLog
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: artifacts/log/$(_BuildConfig)/Build.binlog
|
|
|
|
artifactName: $(Agent.Os)_$(Agent.JobName) BuildVSIXBinLog
|
|
|
|
artifactType: Container
|
|
|
|
parallel: true
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2022-10-27 23:50:00 +03:00
|
|
|
- powershell: eng\SetupVSHive.ps1
|
|
|
|
displayName: Setup VS Hive
|
2022-10-28 00:24:18 +03:00
|
|
|
|
2022-03-28 21:02:43 +03:00
|
|
|
- script: eng\CIBuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
-test
|
2022-10-12 00:58:39 +03:00
|
|
|
-integrationTest
|
|
|
|
/p:BuildProjectReferences=false
|
2022-03-28 21:02:43 +03:00
|
|
|
name: Run_Tests
|
|
|
|
displayName: Run Unit and Integration tests
|
2019-07-22 08:17:43 +03:00
|
|
|
condition: succeeded()
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2022-05-13 23:36:06 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Upload Run tests BinLog
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: artifacts/log/$(_BuildConfig)/Build.binlog
|
|
|
|
artifactName: $(Agent.Os)_$(Agent.JobName) RunTestsBinLog
|
|
|
|
artifactType: Container
|
|
|
|
parallel: true
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-09-19 19:36:02 +03:00
|
|
|
- powershell: ./eng/scripts/FinishDumpCollectionForHangingBuilds.ps1 artifacts/log/$(_BuildConfig)
|
|
|
|
displayName: Finish background dump collection
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2021-02-10 02:53:42 +03:00
|
|
|
- powershell: |
|
|
|
|
$version = $(node -p "require('./package.json').version" | Out-String).Trim()
|
2022-02-24 03:10:57 +03:00
|
|
|
yarn install
|
2021-02-10 02:53:42 +03:00
|
|
|
md $(Build.SourcesDirectory)/artifacts/packages/VSCode/$(_BuildConfig)/ -ea 0
|
2022-01-27 22:48:26 +03:00
|
|
|
npx vsce@1.103.1 package -o $(Build.SourcesDirectory)/artifacts/packages/VSCode/$(_BuildConfig)/blazorwasm-companion-$version.vsix
|
2021-02-10 02:53:42 +03:00
|
|
|
displayName: Produce Blazor WASM Debugging Extension VSIX
|
|
|
|
workingDirectory: $(Build.SourcesDirectory)/src/Razor/src/Microsoft.AspNetCore.Razor.VSCode.BlazorWasmDebuggingExtension
|
2022-01-27 22:48:26 +03:00
|
|
|
failOnStderr: true
|
|
|
|
condition: and(succeeded(), eq(variables['_BuildConfig'], 'Release'))
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
2020-02-26 00:48:09 +03:00
|
|
|
displayName: Upload Test Results
|
2019-07-22 08:17:43 +03:00
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: artifacts/TestResults/$(_BuildConfig)/
|
|
|
|
artifactName: $(Agent.Os)_$(Agent.JobName) TestResults
|
|
|
|
artifactType: Container
|
|
|
|
parallel: true
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2020-03-24 20:58:49 +03:00
|
|
|
# - task: PublishTestResults@2
|
|
|
|
# displayName: Publish VSCode Test Results
|
|
|
|
# inputs:
|
|
|
|
# testResultsFormat: 'JUnit'
|
|
|
|
# testResultsFiles: '*.xml'
|
|
|
|
# searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
|
|
|
|
# continueOnError: true
|
|
|
|
# condition: always()
|
2022-11-22 01:46:22 +03:00
|
|
|
|
|
|
|
# Publish an artifact that the RoslynInsertionTool is able to find by its name.
|
2019-07-22 08:17:43 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
2022-11-22 01:46:22 +03:00
|
|
|
displayName: Publish Artifact VSSetup
|
2019-07-22 08:17:43 +03:00
|
|
|
inputs:
|
2022-11-22 01:46:22 +03:00
|
|
|
PathtoPublish: 'artifacts\VSSetup\$(_BuildConfig)'
|
|
|
|
ArtifactName: 'VSSetup'
|
2019-07-22 08:17:43 +03:00
|
|
|
continueOnError: true
|
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish VS for Mac Artifacts
|
|
|
|
inputs:
|
2022-11-22 01:46:22 +03:00
|
|
|
PathtoPublish: 'artifacts\MPack\$(_BuildConfig)'
|
2019-07-22 08:17:43 +03:00
|
|
|
ArtifactName: MPack_$(Agent.Os)_$(_BuildConfig)
|
|
|
|
continueOnError: true
|
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish package artifacts
|
|
|
|
inputs:
|
2022-11-22 01:46:22 +03:00
|
|
|
PathtoPublish: 'artifacts\packages\$(_BuildConfig)'
|
2019-07-22 08:17:43 +03:00
|
|
|
ArtifactName: Packages_$(Agent.Os)_$(_BuildConfig)
|
|
|
|
continueOnError: true
|
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2022-10-27 20:21:29 +03:00
|
|
|
|
2021-02-10 02:53:42 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish VS Code extension artifacts
|
|
|
|
inputs:
|
2022-11-22 01:46:22 +03:00
|
|
|
PathtoPublish: 'artifacts\packages\VSCode\$(_BuildConfig)'
|
2021-02-10 02:53:42 +03:00
|
|
|
ArtifactName: BlazorWasmDebuggingExtension
|
|
|
|
continueOnError: true
|
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2022-11-22 01:46:22 +03:00
|
|
|
|
|
|
|
- powershell: Write-Host "##vso[task.setvariable variable=VisualStudio.DropName]Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)"
|
|
|
|
displayName: Setting VisualStudio.DropName variable
|
|
|
|
|
|
|
|
# Publishes setup VSIXes to a drop.
|
|
|
|
# Note: The insertion tool looks for the display name of this task in the logs.
|
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
|
|
|
|
displayName: Upload VSTS Drop
|
|
|
|
inputs:
|
|
|
|
DropName: $(VisualStudio.DropName)
|
|
|
|
DropFolder: 'artifacts\VSSetup\$(_BuildConfig)\Insertion'
|
|
|
|
AccessToken: $(_DevDivDropAccessToken)
|
|
|
|
continueOnError: true
|
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2018-12-02 03:25:55 +03:00
|
|
|
|
2022-11-09 20:07:52 +03:00
|
|
|
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- job: macOS
|
|
|
|
pool:
|
|
|
|
vmImage: macOS-11
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Install Node 10.x
|
2019-12-11 00:05:34 +03:00
|
|
|
inputs:
|
2022-11-09 20:07:52 +03:00
|
|
|
versionSpec: 10.x
|
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Setup Private Feeds Credentials
|
|
|
|
inputs:
|
|
|
|
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
|
|
|
|
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
|
|
|
|
env:
|
|
|
|
Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
$(_InternalRuntimeDownloadArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Upload TestResults
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: artifacts/TestResults/$(_BuildConfig)/
|
|
|
|
artifactName: $(Agent.Os)_$(Agent.JobName) TestResults
|
|
|
|
artifactType: Container
|
|
|
|
parallel: true
|
2022-02-02 23:26:46 +03:00
|
|
|
|
2022-11-09 20:07:52 +03:00
|
|
|
- job: Linux
|
|
|
|
container:
|
|
|
|
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7
|
|
|
|
options: --init # This ensures all the stray defunct processes are reaped.
|
|
|
|
pool:
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
|
|
|
vmImage: ubuntu-latest
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
|
|
|
name: NetCore1ESPool-Internal
|
|
|
|
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- LC_ALL: 'en_US.UTF-8'
|
|
|
|
- LANG: 'en_US.UTF-8'
|
|
|
|
- LANGUAGE: 'en_US.UTF-8'
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Install Node 10.x
|
2019-12-11 00:05:34 +03:00
|
|
|
inputs:
|
2022-11-09 20:07:52 +03:00
|
|
|
versionSpec: 10.x
|
|
|
|
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Setup Private Feeds Credentials
|
|
|
|
inputs:
|
|
|
|
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
|
|
|
|
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
|
|
|
|
env:
|
|
|
|
Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
$(_InternalRuntimeDownloadArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Upload Test Results
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: artifacts/TestResults/$(_BuildConfig)/
|
|
|
|
artifactName: $(Agent.Os)_$(Agent.JobName) TestResults
|
|
|
|
artifactType: Container
|
|
|
|
parallel: true
|
2019-07-22 08:17:43 +03:00
|
|
|
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
2022-10-27 10:01:04 +03:00
|
|
|
- stage: publishBuildAssets
|
|
|
|
displayName: Publish to Build Asset Registry
|
|
|
|
dependsOn: build
|
|
|
|
jobs:
|
|
|
|
# Publish to Build Asset Registry
|
|
|
|
- template: /eng/common/templates/job/publish-build-assets.yml
|
|
|
|
parameters:
|
|
|
|
publishUsingPipelines: true
|
|
|
|
pool:
|
|
|
|
name: NetCore1ESPool-Svc-Internal
|
|
|
|
demands: ImageOverride -equals windows.vs2022.amd64
|
|
|
|
|
2019-07-22 08:17:43 +03:00
|
|
|
- template: eng\common\templates\post-build\post-build.yml
|
|
|
|
parameters:
|
2022-10-27 10:01:04 +03:00
|
|
|
validateDependsOn:
|
|
|
|
- publishBuildAssets
|
2020-09-28 19:26:17 +03:00
|
|
|
publishingInfraVersion: 3
|
|
|
|
enableSigningValidation: false
|
|
|
|
enableNugetValidation: false
|
2022-06-17 23:19:28 +03:00
|
|
|
SDLValidationParameters:
|
|
|
|
enable: true
|
|
|
|
params: >-
|
|
|
|
-SourceToolsList @("policheck","credscan")
|
|
|
|
-TsaInstanceURL $(_TsaInstanceURL)
|
|
|
|
-TsaProjectName $(_TsaProjectName)
|
|
|
|
-TsaNotificationEmail $(_TsaNotificationEmail)
|
|
|
|
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
|
|
|
|
-TsaBugAreaPath $(_TsaBugAreaPath)
|
|
|
|
-TsaIterationPath $(_TsaIterationPath)
|
|
|
|
-TsaRepositoryName "Razor-Tooling"
|
|
|
|
-TsaCodebaseName "Razor-Tooling"
|
2022-07-27 06:43:30 +03:00
|
|
|
-TsaPublish $True
|
2022-11-22 01:46:22 +03:00
|
|
|
|
|
|
|
- stage: insert
|
|
|
|
dependsOn: publish_using_darc
|
|
|
|
displayName: Insert to VS
|
|
|
|
jobs:
|
|
|
|
- job: insert
|
|
|
|
displayName: Insert to VS
|
|
|
|
pool:
|
|
|
|
name: NetCore1ESPool-Svc-Internal
|
|
|
|
demands: ImageOverride -equals windows.vs2022.amd64
|
|
|
|
steps:
|
|
|
|
- download: current
|
|
|
|
artifact: VSSetup
|
|
|
|
- powershell: |
|
|
|
|
$branchName = "$(Build.SourceBranch)".Substring("refs/heads/".Length)
|
|
|
|
Write-Host "##vso[task.setvariable variable=ComponentBranchName]$branchName"
|
|
|
|
displayName: Get Branch Name
|
|
|
|
- template: eng/pipelines/insert.yml
|
|
|
|
parameters:
|
|
|
|
buildUserName: "dn-bot@microsoft.com"
|
|
|
|
buildPassword: $(dn-bot-devdiv-build-e-code-full-release-e-packaging-r)
|
|
|
|
componentUserName: "dn-bot@microsoft.com"
|
|
|
|
componentPassword: $(dn-bot-dnceng-build-e-code-full-release-e-packaging-r)
|
|
|
|
componentBuildProjectName: internal
|
|
|
|
sourceBranch: "$(ComponentBranchName)"
|
|
|
|
publishDataURI: "https://dev.azure.com/dnceng/internal/_apis/git/repositories/dotnet-razor/items?path=/eng/config/PublishData.json&versionType=commit&version=507dd3c0c9af56897c7d9f2830c82d690e0ef3d4&api-version=6.0"
|
|
|
|
publishDataAccessToken: "$(System.AccessToken)"
|
|
|
|
dropPath: '$(Pipeline.Workspace)\VSSetup'
|