2024-04-18 07:18:59 +03:00
|
|
|
# azure-pipelines.yml
|
2022-05-28 00:15:15 +03:00
|
|
|
parameters:
|
|
|
|
- name: SkipTests
|
|
|
|
displayName: Skip Tests
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
|
2019-05-14 01:52:48 +03:00
|
|
|
# CI and PR triggers
|
|
|
|
trigger:
|
2020-08-19 22:07:52 +03:00
|
|
|
- main
|
2019-05-31 00:30:46 +03:00
|
|
|
- feature/*
|
2022-04-02 00:35:20 +03:00
|
|
|
- release/*
|
2019-05-14 01:52:48 +03:00
|
|
|
pr:
|
2020-08-19 22:07:52 +03:00
|
|
|
- main
|
2019-05-31 00:30:46 +03:00
|
|
|
- feature/*
|
2022-04-02 00:35:20 +03:00
|
|
|
- release/*
|
2019-05-14 01:52:48 +03:00
|
|
|
|
|
|
|
variables:
|
2024-04-19 23:33:36 +03:00
|
|
|
- template: /eng/templates/variables-template.yml@self
|
2024-04-17 23:45:46 +03:00
|
|
|
- name: system.debug
|
|
|
|
value: true
|
2024-04-18 07:18:59 +03:00
|
|
|
- name: additionalWindowsArgs
|
|
|
|
value: '--diag $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/diag.txt -p:m=1'
|
|
|
|
- name: additionalLinuxArgs
|
|
|
|
value: '--diag $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/diag.txt'
|
2019-05-14 01:52:48 +03:00
|
|
|
|
2019-09-19 21:14:32 +03:00
|
|
|
stages:
|
|
|
|
- stage: build
|
|
|
|
displayName: Build and Test
|
|
|
|
jobs:
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enableMicrobuild: true
|
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enablePublishTestResults: true
|
2020-10-09 00:28:55 +03:00
|
|
|
enablePublishBuildAssets: true
|
2019-09-19 21:14:32 +03:00
|
|
|
enablePublishUsingPipelines: $(_PublishUsingPipelines)
|
|
|
|
jobs:
|
|
|
|
- job: Windows_NT
|
|
|
|
pool:
|
|
|
|
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
|
2022-09-02 00:29:09 +03:00
|
|
|
name: NetCore-Public
|
2023-01-27 03:53:05 +03:00
|
|
|
demands: ImageOverride -equals windows.vs2022.amd64.open
|
2019-09-19 21:14:32 +03:00
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
2021-09-30 00:19:44 +03:00
|
|
|
name: NetCore1ESPool-Internal
|
2022-07-21 20:04:16 +03:00
|
|
|
demands: ImageOverride -equals windows.vs2022.amd64
|
2019-09-19 21:14:32 +03:00
|
|
|
variables:
|
2024-04-17 23:45:46 +03:00
|
|
|
- name: RunIntegrationTests
|
|
|
|
value: true
|
|
|
|
- name: TRYDOTNET_PREBUILDS_PATH
|
|
|
|
value: $(Build.SourcesDirectory)\artifacts\trydotnet-prebuilds
|
|
|
|
- name: POCKETLOGGER_LOG_PATH
|
|
|
|
value: $(Build.SourcesDirectory)\artifacts\logs\pocketlogger.log
|
2019-09-19 21:14:32 +03:00
|
|
|
# Enable signing for internal, non-PR builds
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
2019-10-09 01:53:21 +03:00
|
|
|
- group: DotNet-Symbol-Server-Pats
|
2019-09-19 21:14:32 +03:00
|
|
|
- name: _SignType
|
|
|
|
value: Real
|
2020-10-09 00:28:55 +03:00
|
|
|
- name: _DotNetPublishToBlobFeed
|
2024-06-13 21:49:32 +03:00
|
|
|
value: false
|
2019-09-19 21:14:32 +03:00
|
|
|
- name: _BuildArgs
|
|
|
|
value: /p:SignType=$(_SignType)
|
2019-10-09 01:53:21 +03:00
|
|
|
/p:DotNetSignType=$(_SignType)
|
|
|
|
/p:MicroBuild_SigningEnabled=true
|
|
|
|
/p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
|
|
|
|
/p:TeamName=$(_TeamName)
|
2024-06-13 21:49:32 +03:00
|
|
|
/p:DotNetPublishToBlobFeed=false
|
2019-10-09 01:53:21 +03:00
|
|
|
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
|
|
|
|
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
|
|
|
|
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
|
|
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
2020-10-09 00:28:55 +03:00
|
|
|
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
2019-09-19 21:14:32 +03:00
|
|
|
# else
|
|
|
|
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- name: _SignType
|
|
|
|
value: Test
|
|
|
|
- name: _BuildArgs
|
|
|
|
value: /p:SignType=$(_SignType)
|
|
|
|
steps:
|
2024-04-19 23:33:36 +03:00
|
|
|
- template: /eng/templates/build-and-test-job-windows-templates.yml@self
|
2024-04-18 07:18:59 +03:00
|
|
|
parameters:
|
|
|
|
buildConfig: $(_BuildConfig)
|
|
|
|
skipTests: $(SkipTests)
|
|
|
|
buildArgs: $(_BuildArgs)
|
|
|
|
additionalArgs: $(additionalWindowsArgs)
|
2024-04-19 23:33:36 +03:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Windows artifacts
|
|
|
|
inputs:
|
|
|
|
pathToPublish: $(Build.SourcesDirectory)/artifacts/
|
|
|
|
artifactName: Windows_artifacts
|
|
|
|
artifactType: container
|
|
|
|
condition: always()
|
2020-01-09 21:10:07 +03:00
|
|
|
|
2019-09-19 21:14:32 +03:00
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enableMicrobuild: true
|
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enablePublishTestResults: true
|
2020-01-09 21:10:07 +03:00
|
|
|
enablePublishBuildAssets: false
|
2020-10-09 00:28:55 +03:00
|
|
|
enablePublishUsingPipelines: false
|
2019-09-19 21:14:32 +03:00
|
|
|
jobs:
|
|
|
|
- job: Linux
|
|
|
|
pool:
|
2021-10-29 21:02:15 +03:00
|
|
|
vmImage: ubuntu-20.04
|
2019-09-19 21:14:32 +03:00
|
|
|
variables:
|
2024-04-17 23:45:46 +03:00
|
|
|
- name: TRYDOTNET_PREBUILDS_PATH
|
|
|
|
value: $(Build.SourcesDirectory)/artifacts/trydotnet-prebuilds
|
|
|
|
- name: POCKETLOGGER_LOG_PATH
|
|
|
|
value: $(Build.SourcesDirectory)/artifacts/logs/pocketlogger.log
|
2019-09-19 21:14:32 +03:00
|
|
|
# Enable signing for internal, non-PR builds
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- name: _SignType
|
|
|
|
value: Test
|
|
|
|
- name: _BuildArgs
|
|
|
|
value: /p:SignType=$(_SignType)
|
|
|
|
/p:DotNetSignType=$(_SignType)
|
|
|
|
/p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
|
|
|
|
/p:TeamName=$(_TeamName)
|
|
|
|
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
|
|
|
# else
|
|
|
|
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- name: _SignType
|
|
|
|
value: Test
|
|
|
|
- name: _BuildArgs
|
|
|
|
value: /p:SignType=$(_SignType)
|
|
|
|
steps:
|
2024-04-19 23:33:36 +03:00
|
|
|
- template: /eng/templates/build-and-test-job-linux-templates.yml@self
|
2024-04-18 07:18:59 +03:00
|
|
|
parameters:
|
|
|
|
buildConfig: $(_BuildConfig)
|
|
|
|
skipTests: $(SkipTests)
|
|
|
|
additionalArgs: $(additionalLinuxArgs)
|
2024-04-19 23:33:36 +03:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Linux artifacts
|
|
|
|
inputs:
|
|
|
|
pathToPublish: $(Build.SourcesDirectory)/artifacts/
|
|
|
|
artifactName: Linux_artifacts
|
|
|
|
artifactType: container
|
|
|
|
condition: always()
|
2019-07-23 23:01:31 +03:00
|
|
|
|
2020-10-09 00:28:55 +03:00
|
|
|
#---------------------------------------------------------------------------------------------------------------------#
|
|
|
|
# Post Build #
|
|
|
|
#---------------------------------------------------------------------------------------------------------------------#
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- template: eng/common/templates/post-build/post-build.yml
|
|
|
|
parameters:
|
2022-04-05 01:09:18 +03:00
|
|
|
publishingInfraVersion: 3
|
2020-10-09 00:28:55 +03:00
|
|
|
# Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved.
|
|
|
|
enableSymbolValidation: false
|
|
|
|
# SourceLink improperly looks for generated files. See https://github.com/dotnet/arcade/issues/3069
|
|
|
|
enableSourceLinkValidation: false
|