Welcome to mirror list, hosted at ThFree Co, Russian Federation.

jobs.yml « jobs « templates « common « eng - github.com/dotnet/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 554e71cfc436dd5889ffae0631aeb213080c5a96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
parameters:
  # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
  continueOnError: false

  # Optional: Include PublishBuildArtifacts task
  enablePublishBuildArtifacts: false

  # Optional: Enable publishing using release pipelines
  enablePublishUsingPipelines: false

  # 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: []

  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
    
  # 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

  enableSourceIndex: false
  sourceIndexParams: {}

# 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 }}

- ${{ if eq(parameters.enableSourceBuild, true) }}:
  - template: /eng/common/templates/jobs/source-build.yml
    parameters:
      allCompletedJobId: Source_Build_Complete
      ${{ each parameter in parameters.sourceBuildParameters }}:
        ${{ parameter.key }}: ${{ parameter.value }}

- ${{ if eq(parameters.enableSourceIndex, 'true') }}:
  - template: ../job/source-index-stage1.yml
    parameters:
      runAsPublic: ${{ parameters.runAsPublic }}
      ${{ each parameter in parameters.sourceIndexParams }}:
        ${{ parameter.key }}: ${{ parameter.value }}

- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
  
  - ${{ 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 }}
        - ${{ if eq(parameters.enableSourceBuild, true) }}:
          - Source_Build_Complete
        pool:
          # 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

        runAsPublic: ${{ parameters.runAsPublic }}
        publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
        enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}