-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.yml
125 lines (110 loc) · 3.93 KB
/
build.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
116
117
118
119
120
121
122
123
124
125
parameters:
name: ''
pool: ''
nugetVersion: 5.8.0
sdkVersion: 3.1.201
net5SdkVersion: 5.0.102
artifactFileName: ''
appInsightsInstrumentationKey: ''
publishArtifacts: true
jobs:
- job: ${{ parameters.name }}
pool: ${{ parameters.pool }}
steps:
- checkout: self
submodules: true
clean: true
- task: NuGetToolInstaller@0
displayName: 'Use NuGet'
inputs:
versionSpec: ${{ parameters.nugetVersion }}
- task: UseDotNet@2
displayName: 'Use .NET Core SDK'
inputs:
packageType: sdk
version: ${{ parameters.sdkVersion }}
includePreviewVersions: true
- task: UseDotNet@2
displayName: 'Use .NET 5 SDK'
inputs:
packageType: sdk
version: ${{ parameters.net5SdkVersion }}
includePreviewVersions: true
- task: PowerShell@2
inputs:
targetType: Inline
pwsh: true
script: dotnet --info
- task: PowerShell@2
inputs:
filePath: build.ps1
workingDirectory: ./
arguments: Debug -appInsightsInstrumentationKey '${{ parameters.appInsightsInstrumentationKey }}'
pwsh: true
displayName: 'restore & build Debug'
- task: PowerShell@2
inputs:
filePath: build.ps1
workingDirectory: ./
arguments: Release -appInsightsInstrumentationKey '${{ parameters.appInsightsInstrumentationKey }}'
pwsh: true
displayName: 'restore & build Release'
### Remove the next 3 tasks when netcoreapp2.1 is no longer supported/targeted by the Project
- task: DotNetCoreCLI@2
inputs:
command: publish
projects: '**/TechTalk.SpecFlow.GeneratorTests.csproj'
arguments: --no-build -f netcoreapp2.1 -o $(Build.SourcesDirectory)/Tests/TechTalk.SpecFlow.GeneratorTests/bin/Debug/netcoreapp2.1
publishWebProjects: false
zipAfterPublish: false
modifyOutputPath: false
displayName: 'Publish GeneratorTests netcoreapp2.1 tests'
- task: DotNetCoreCLI@2
inputs:
command: publish
projects: '**/TechTalk.SpecFlow.PluginTests.csproj'
arguments: --no-build -f netcoreapp2.1 -o $(Build.SourcesDirectory)/Tests/TechTalk.SpecFlow.PluginTests/bin/Debug/netcoreapp2.1
publishWebProjects: false
zipAfterPublish: false
modifyOutputPath: false
displayName: 'Publish PluginTests netcoreapp2.1 tests'
- task: DotNetCoreCLI@2
inputs:
command: publish
projects: '**/TechTalk.SpecFlow.RuntimeTests.csproj'
arguments: --no-build -f netcoreapp2.1 -o $(Build.SourcesDirectory)/Tests/TechTalk.SpecFlow.RuntimeTests/bin/Debug/netcoreapp2.1
publishWebProjects: false
zipAfterPublish: false
modifyOutputPath: false
displayName: 'Publish RuntimeTests netcoreapp2.1 tests'
###
- task: ArchiveFiles@2
displayName: 'Archive $(Build.SourcesDirectory)'
condition: and(succeeded(), ${{ parameters.publishArtifacts}})
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
archiveFile: ${{ parameters.artifactFileName }}
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: SpecFlow.CI-Sources'
condition: and(succeeded(), ${{ parameters.publishArtifacts}})
inputs:
PathtoPublish: ${{ parameters.artifactFileName }}
artifactType: container
ArtifactName: 'SpecFlow.CI-BuildResult-${{ parameters.name }}'
- task: CopyFiles@2
displayName: 'Copy binlogs'
condition: ${{ parameters.publishArtifacts}}
inputs:
contents: '$(Build.SourcesDirectory)/*.binlog'
targetFolder: '$(Build.SourcesDirectory)/binlogs'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: SpecFlow.CI-Binlogs'
condition: ${{ parameters.publishArtifacts}}
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/binlogs'
artifactType: container
ArtifactName: 'SpecFlow.CI-Binlogs-${{ parameters.name }}'
- task: whitesource.ws-bolt.bolt.wss.WhiteSource Bolt@19
displayName: 'WhiteSource Bolt'
inputs:
advance: true