2018-12-04 17:31:23 +00:00
|
|
|
parameters:
|
2019-10-24 22:05:36 +00:00
|
|
|
# See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
|
2018-12-04 17:31:23 +00:00
|
|
|
continueOnError: false
|
|
|
|
|
|
|
|
# Optional: Include PublishBuildArtifacts task
|
|
|
|
enablePublishBuildArtifacts: false
|
|
|
|
|
2019-03-21 12:33:28 +00:00
|
|
|
# Optional: Enable publishing using release pipelines
|
|
|
|
enablePublishUsingPipelines: false
|
2021-01-20 14:08:25 +00:00
|
|
|
|
2022-02-03 17:55:02 +00:00
|
|
|
# Optional: Disable component governance detection. In general, component governance
|
|
|
|
# should be on for all jobs. Use only in the event of issues.
|
|
|
|
disableComponentGovernance: false
|
|
|
|
|
2021-01-20 14:08:25 +00:00
|
|
|
# Optional: Enable running the source-build jobs to build repo from source
|
|
|
|
enableSourceBuild: false
|
|
|
|
|
|
|
|
# Optional: Parameters for source-build template.
|
|
|
|
# See /eng/common/templates/jobs/source-build.yml for options
|
|
|
|
sourceBuildParameters: []
|
|
|
|
|
2019-03-12 12:00:24 +00:00
|
|
|
graphFileGeneration:
|
|
|
|
# Optional: Enable generating the graph files at the end of the build
|
|
|
|
enabled: false
|
|
|
|
# Optional: Include toolset dependencies in the generated graph files
|
|
|
|
includeToolset: false
|
|
|
|
|
2018-12-04 17:31:23 +00:00
|
|
|
# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
|
|
|
|
jobs: []
|
|
|
|
|
|
|
|
# Optional: Override automatically derived dependsOn value for "publish build assets" job
|
|
|
|
publishBuildAssetsDependsOn: ''
|
|
|
|
|
|
|
|
# Optional: should run as a public build even in the internal project
|
|
|
|
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
|
|
|
|
runAsPublic: false
|
|
|
|
|
2021-01-09 13:53:15 +00:00
|
|
|
enableSourceIndex: false
|
|
|
|
sourceIndexParams: {}
|
|
|
|
|
2018-12-04 17:31:23 +00:00
|
|
|
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
|
|
|
|
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- ${{ each job in parameters.jobs }}:
|
|
|
|
- template: ../job/job.yml
|
|
|
|
parameters:
|
|
|
|
# pass along parameters
|
|
|
|
${{ each parameter in parameters }}:
|
|
|
|
${{ if ne(parameter.key, 'jobs') }}:
|
|
|
|
${{ parameter.key }}: ${{ parameter.value }}
|
|
|
|
|
|
|
|
# pass along job properties
|
|
|
|
${{ each property in job }}:
|
|
|
|
${{ if ne(property.key, 'job') }}:
|
|
|
|
${{ property.key }}: ${{ property.value }}
|
|
|
|
|
|
|
|
name: ${{ job.job }}
|
|
|
|
|
2021-01-20 14:08:25 +00:00
|
|
|
- ${{ if eq(parameters.enableSourceBuild, true) }}:
|
2020-09-24 13:28:58 +00:00
|
|
|
- template: /eng/common/templates/jobs/source-build.yml
|
|
|
|
parameters:
|
|
|
|
allCompletedJobId: Source_Build_Complete
|
|
|
|
${{ each parameter in parameters.sourceBuildParameters }}:
|
|
|
|
${{ parameter.key }}: ${{ parameter.value }}
|
|
|
|
|
2021-01-09 13:53:15 +00:00
|
|
|
- ${{ if eq(parameters.enableSourceIndex, 'true') }}:
|
|
|
|
- template: ../job/source-index-stage1.yml
|
|
|
|
parameters:
|
|
|
|
runAsPublic: ${{ parameters.runAsPublic }}
|
|
|
|
${{ each parameter in parameters.sourceIndexParams }}:
|
|
|
|
${{ parameter.key }}: ${{ parameter.value }}
|
|
|
|
|
2019-10-24 22:05:36 +00:00
|
|
|
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
2021-01-09 13:53:15 +00:00
|
|
|
|
2019-10-24 22:05:36 +00:00
|
|
|
- ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
|
|
|
|
- template: ../job/publish-build-assets.yml
|
|
|
|
parameters:
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
dependsOn:
|
|
|
|
- ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
|
|
|
|
- ${{ each job in parameters.publishBuildAssetsDependsOn }}:
|
|
|
|
- ${{ job.job }}
|
|
|
|
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
|
|
|
|
- ${{ each job in parameters.jobs }}:
|
|
|
|
- ${{ job.job }}
|
2021-01-20 14:08:25 +00:00
|
|
|
- ${{ if eq(parameters.enableSourceBuild, true) }}:
|
2020-09-24 13:28:58 +00:00
|
|
|
- Source_Build_Complete
|
2019-10-24 22:05:36 +00:00
|
|
|
pool:
|
2022-02-03 17:55:02 +00:00
|
|
|
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
|
|
|
|
name: VSEngSS-MicroBuild2022-1ES
|
|
|
|
demands: Cmd
|
|
|
|
# If it's not devdiv, it's dnceng
|
|
|
|
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
|
|
|
|
name: NetCore1ESPool-Internal
|
|
|
|
demands: ImageOverride -equals Build.Server.Amd64.VS2019
|
|
|
|
|
2019-10-24 22:05:36 +00:00
|
|
|
runAsPublic: ${{ parameters.runAsPublic }}
|
|
|
|
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
|
|
|
|
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
|