-
Notifications
You must be signed in to change notification settings - Fork 553
Expand file tree
/
Copy pathazure-pipelines-public.yml
More file actions
84 lines (81 loc) · 3.12 KB
/
azure-pipelines-public.yml
File metadata and controls
84 lines (81 loc) · 3.12 KB
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
variables:
- name: _BuildConfig
value: Release
- name: _TeamName
value: AspNetCore
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: _DotNetArtifactsCategory
value: ASPNETENTITYFRAMEWORK6
- name: _InternalRuntimeDownloadArgs
value: ''
- template: /eng/common/templates/variables/pool-providers.yml
trigger:
batch: true
branches:
include:
- main
- release/*
- internal/release/6.*
pr: ['*']
stages:
- stage: build
displayName: Build
jobs:
- template: eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
publishingVersion: 4
enablePublishBuildAssets: true
enablePublishTestResults: true
enableTelemetry: true
helixRepo: dotnet/ef6
jobs:
- job: Windows
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
enablePublishing: true
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2022-open
timeoutInMinutes: 180
variables:
- _AdditionalBuildArgs: ''
- _InternalBuildArgs: ''
steps:
- checkout: self
clean: true
- powershell: >
Get-ChildItem -ErrorAction SilentlyContinue -Recurse 'C:\Program Files\Microsoft SQL Server\sqlcmd.exe' |
Sort-Object -Property @{Expression={$_.FullName.Length}; Descending=$true},@{Expression={$_.FullName}; Descending=$true} |
Select-Object -First 1 |
Foreach-Object {Write-Host "##vso[task.prependpath]$($_.DirectoryName)"}
displayName: Add SqlCmd to path
- script: tools\CleanMSSQLLocalDB.cmd
displayName: Cleanup LocalDB databases
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs)
$(_InternalRuntimeDownloadArgs) $(_AdditionalBuildArgs)
name: Build
- task: PublishBuildArtifacts@1
displayName: Upload TestResults
condition: always()
continueOnError: true
inputs:
pathtoPublish: artifacts/TestResults/$(_BuildConfig)/
artifactName: $(Agent.Os)_$(Agent.JobName) TestResults
artifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Upload artifacts
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
inputs:
pathtoPublish: 'artifacts/packages/'
artifactName: packages
artifactType: Container
parallel: true