forked from dpetrovych/SpecFlow.VS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
105 lines (91 loc) · 2.75 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
trigger:
- main
pool:
vmImage: 'windows-2022'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
- task: PowerShell@2
displayName: 'Build Connectors'
inputs:
targetType: 'inline'
script: |
cd .\Connectors
.\build.ps1 $(buildConfiguration)
- task: VSBuild@1
displayName: 'Build Solution'
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployExtension=false /p:AppInsightsInstrumentationKey=$(AppInsightsInstrumentationKey) /nowarn:VSTHRD010'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: test
projects: '**/*[Tt]ests/*.csproj'
arguments: '--configuration $(BuildConfiguration) --no-build'
testRunTitle: Unit Tests
- task: DotNetCoreCLI@2
displayName: Run SpecFlow Scenarios
inputs:
command: test
projects: '**/*[Ss]pecs/*.csproj'
arguments: '--configuration $(BuildConfiguration) --runtime win-x64'
testRunTitle: 'Deveroom Specs'
- task: CopyFiles@2
displayName: 'Copy dlls and changelog'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: |
**\bin\$(buildConfiguration)\**
Changelog.md
TargetFolder: '$(build.artifactstagingdirectory)\drop'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy marketplace scripts'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: |
publish*.ps1
.marketplace\**
TargetFolder: '$(build.artifactstagingdirectory)\marketplace'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy NuGet folder'
inputs:
SourceFolder: 'd:\a\1\Nuget'
Contents: '**'
TargetFolder: '$(build.artifactstagingdirectory)\drop\NuGet'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy VSIX'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(buildConfiguration)\**\*.vsix'
TargetFolder: '$(build.artifactstagingdirectory)\vsix'
flattenFolders: true
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\drop'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: marketplace'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\marketplace'
ArtifactName: marketplace
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: vsix'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\vsix'
ArtifactName: vsix
condition: succeededOrFailed()