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

source-index-stage1.yml « job « templates « common « eng - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b33f06b9517de102c3a70efb37e811684501001e (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
parameters:
  runAsPublic: false
  sourceIndexPackageVersion: 1.0.0-beta5
  sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
  sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
  binlogPath: artifacts/log/Debug/Build.binlog
  pool:
    vmImage: vs2017-win2016

jobs:
- job: SourceIndexStage1
  variables:
  - name: SourceIndexPackageVersion
    value: ${{ parameters.sourceIndexPackageVersion }}
  - name: SourceIndexPackageSource
    value: ${{ parameters.sourceIndexPackageSource }}
  - name: BinlogPath
    value: ${{ parameters.binlogPath }}
  - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
    - group: source-dot-net stage1 variables

  pool: ${{ parameters.pool }}
  steps:
  - task: UseDotNet@2
    displayName: Use .NET Core sdk 3.1
    inputs:
      packageType: sdk
      version: 3.1.x

  - script: |
      dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
      dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
      echo ##vso[task.prependpath]$(Build.SourcesDirectory)/.source-index/tools
    displayName: Download Tools

  - script: ${{ parameters.sourceIndexBuildCommand }}
    displayName: Build Repository

  - script: BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
    displayName: Process Binlog into indexable sln

  - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
    - script: UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
      displayName: Upload stage1 artifacts to source index
      env:
        BLOB_CONTAINER_URL: $(source-dot-net-stage1-blob-container-url)