summaryrefslogtreecommitdiff
path: root/eng/send-to-helix-step.yml
blob: 9f7816c35b8554914c63cb782f6d632c83e0c3b2 (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
parameters:
  displayName: ''
  condition: ''
  archType: ''
  osGroup: ''
  buildConfig: ''
  creator: ''
  publishTestResults: ''
  helixAccessToken: ''
  helixBuild: ''
  helixSource: ''
  helixQueues: ''
  helixType: ''
  scenarios: ''
  timeoutPerTestCollectionInMinutes: ''
  timeoutPerTestInMinutes: ''
  runCrossGen: ''
  helixProjectArguments: ''
  runInUnloadableContext: ''

steps:
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
  # TODO: Remove and consolidate this when we move to arcade via init-tools.cmd.
  - powershell: eng\common\build.ps1 /p:DotNetPublishToBlobFeed=true -ci -restore -projects $(Build.SourcesDirectory)\eng\empty.csproj
    displayName: Restore blob feed tasks
    ${{ if ne(parameters.condition, '') }}:
      condition: ${{ parameters.condition }}

  - powershell: eng\common\msbuild.ps1 -ci ${{ parameters.helixProjectArguments }} /maxcpucount /bl:$(Build.SourcesDirectory)/bin/Logs/SendToHelix.binlog
    displayName: ${{ parameters.displayName }}
    ${{ if ne(parameters.condition, '') }}:
      condition: ${{ parameters.condition }}
    env:
      __BuildArch: ${{ parameters.archType }}
      __BuildOS: ${{ parameters.osGroup }}
      __BuildType: ${{ parameters.buildConfig }}
      _Creator: ${{ parameters.creator }}
      _PublishTestResults: ${{ parameters.publishTestResults }}
      _HelixAccessToken: ${{ parameters.helixAccessToken }}
      _HelixBuild: ${{ parameters.helixBuild }}
      _HelixSource: ${{ parameters.helixSource }}
      _HelixTargetQueues: ${{ join(',', parameters.helixQueues) }}
      _HelixType: ${{ parameters.helixType }}
      _RunCrossGen: ${{ parameters.runCrossGen }}
      _RunInUnloadableContext: ${{ parameters.runInUnloadableContext }}
      _Scenarios: ${{ join(',', parameters.scenarios) }}
      _TimeoutPerTestCollectionInMinutes: ${{ parameters.timeoutPerTestCollectionInMinutes }}
      _TimeoutPerTestInMinutes: ${{ parameters.timeoutPerTestInMinutes }}
      ${{ if eq(parameters.publishTestResults, 'true') }}:
        SYSTEM_ACCESSTOKEN: $(System.AccessToken)
      # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed
      NUGET_PACKAGES: $(Build.SourcesDirectory)\.packages 

- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
  # TODO: Remove and consolidate this when we move to arcade via init-tools.sh.
  - script: ./eng/common/build.sh /p:DotNetPublishToBlobFeed=true --ci --restore --projects $(Build.SourcesDirectory)/eng/empty.csproj
    displayName: Restore blob feed tasks
    ${{ if ne(parameters.condition, '') }}:
      condition: ${{ parameters.condition }}
    ${{ if eq(parameters.osGroup, 'FreeBSD') }}:
      env:
        # Arcade uses this SDK instead of trying to restore one.
        DotNetCoreSdkDir: /usr/local/dotnet

  - script: ./eng/common/msbuild.sh --ci ${{ parameters.helixProjectArguments }} /maxcpucount /bl:$(Build.SourcesDirectory)/bin/Logs/SendToHelix.binlog
    displayName: ${{ parameters.displayName }}
    ${{ if ne(parameters.condition, '') }}:
      condition: ${{ parameters.condition }}
    env:
      __BuildArch: ${{ parameters.archType }}
      __BuildOS: ${{ parameters.osGroup }}
      __BuildType: ${{ parameters.buildConfig }}
      _Creator: ${{ parameters.creator }}
      _PublishTestResults: ${{ parameters.publishTestResults }}
      _HelixAccessToken: ${{ parameters.helixAccessToken }}
      _HelixBuild: ${{ parameters.helixBuild }}
      _HelixSource: ${{ parameters.helixSource }}
      _HelixTargetQueues: ${{ join(',', parameters.helixQueues) }}
      _HelixType: ${{ parameters.helixType }}
      _RunCrossGen: ${{ parameters.runCrossGen }}
      _RunInUnloadableContext: ${{ parameters.runInUnloadableContext }}
      _Scenarios: ${{ join(',', parameters.scenarios) }}
      _TimeoutPerTestCollectionInMinutes: ${{ parameters.timeoutPerTestCollectionInMinutes }}
      _TimeoutPerTestInMinutes: ${{ parameters.timeoutPerTestInMinutes }}
      ${{ if eq(parameters.publishTestResults, 'true') }}:
        SYSTEM_ACCESSTOKEN: $(System.AccessToken)
      # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed
      NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages