-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
115 lines (101 loc) · 2.66 KB
/
azure-pipelines.yml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
trigger:
batch: false
branches:
include:
- master
- features/*
- releases/*
- dev/*
paths:
exclude:
- docs
pr:
- master
- features/*
- releases/*
variables:
- group: Sleet
- name: Configuration
value: Release
- name: ReleaseLabel
value: beta
stages:
- stage: Build2017
dependsOn: []
jobs:
- job: Build
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
clean: true
- template: azure-build.yml
parameters:
roslyn: '2.10.0'
- stage: Build2019_3_0
dependsOn: []
jobs:
- job: Build
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
clean: true
- template: azure-build.yml
parameters:
roslyn: '3.0.0'
- stage: Build2019_3_1
dependsOn: []
jobs:
- job: Build
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
clean: true
- template: azure-build.yml
parameters:
roslyn: '3.1.0'
- stage: Deploy
dependsOn:
- Build2017
- Build2019_3_0
- Build2019_3_1
variables:
- name: SleetVersion
value: 2.3.33
jobs:
- deployment: Deploy
pool:
vmImage: 'windows-2019'
environment: sleet
strategy:
runOnce:
deploy:
steps:
- pwsh: |
$anyinstalled = (dotnet tool list -g | select-string sleet) -ne $null
Write-Host "##vso[task.setvariable variable=Sleet.AnyInstalled;]$anyinstalled"
$sameinstalled = (dotnet tool list -g | select-string sleet | select-string $(SleetVersion)) -ne $null
Write-Host "##vso[task.setvariable variable=Sleet.SameInstalled;]$sameinstalled"
displayName: 'Check Sleet installed version'
- task: DotNetCoreCLI@2
displayName: 'Uninstall Sleet if necessary'
continueOnError: true
condition: and(eq(variables['Sleet.AnyInstalled'], 'True'), eq(variables['Sleet.SameInstalled'], 'False'))
inputs:
command: custom
custom: tool
arguments: 'uninstall -g Sleet'
- task: DotNetCoreCLI@2
displayName: 'Install Sleet if necessary'
condition: eq(variables['Sleet.SameInstalled'], 'False')
inputs:
command: custom
custom: tool
arguments: 'install --global Sleet --version $(SleetVersion)'
- task: DownloadPipelineArtifact@2
inputs:
artifactName: packages
- script: 'sleet push --config none $(Pipeline.Workspace)/packages -f --verbose -p "SLEET_FEED_CONNECTIONSTRING=$(SLEET_FEED_CONNECTIONSTRING)"'
displayName: 'Push package via Sleet'