forked from SwedbankPay/swedbank-pay-sdk-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swedbank-pay-sdk-dotnet-Dev-CI.yml
114 lines (90 loc) · 2.9 KB
/
swedbank-pay-sdk-dotnet-Dev-CI.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
trigger:
- develop
pr:
- develop
pool:
name: 'Hosted VS2017'
demands:
- msbuild
- visualstudio
variables:
GitVersion.SemVer: ''
steps:
- task: PowerShell@2
displayName: Setting up Swedbank connection setting token
inputs:
targetType: 'inline'
script: |
# Write your PowerShell commands here.
$Token = "$(SwedbankPayConnectionSettings.Token)"
[System.Environment]::SetEnvironmentVariable("SwedbankPayConnectionSettings.Token", $Token, "User")
- task: GitVersion@5
displayName: GitVersion
inputs:
versionSpec: '5.x'
runtime: 'core'
useConfigFile: true
configFilePath: GitVersion.yml
- task: UseDotNet@2
displayName: 'Setting up framework for build'
inputs:
packageType: 'sdk'
version: '3.1.101'
installationPath: $(Agent.TempDirectory)/dotnet
- task: NuGetToolInstaller@1
inputs:
versionSpec: '5.3.1'
- task: NuGetCommand@2
displayName: 'Restoring packages'
inputs:
command: 'restore'
restoreSolution: '$(Build.SourcesDirectory)\src\SwedbankPay.Sdk.sln'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: 'Build solution for .net core projects'
inputs:
command: 'build'
projects: |
**/*.sln
arguments: '--configuration $(BuildConfiguration) /p:Version=$(GitVersion.NuGetVersionV2)'
- task: MSBuild@1
displayName: 'Build system tests project'
inputs:
solution: '$(Build.SourcesDirectory)\src\Samples\Sample.AspNetCore.SystemTests\Sample.AspNetCore.SystemTests.csproj'
platform: AnyCPU
configuration: $(buildConfiguration)
enabled: false
- task: DotNetCoreCLI@2
displayName: 'Run unit / integration tests'
inputs:
command: test
projects: '$(Build.SourcesDirectory)\src\SwedbankPay.Sdk.Tests\SwedbankPay.Sdk.Tests.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Create release'
inputs:
command: 'publish'
publishWebProjects: true
zipAfterPublish: true
arguments: '--output $(Build.ArtifactStagingDirectory) --configuration $(buildConfiguration) -p:Version=$(GitVersion.NuGetVersionV2)'
- task: DotNetCoreCLI@2
displayName: 'Create NuGet Package - $(buildConfiguration) Version'
inputs:
command: 'pack'
packagesToPack: '$(Build.SourcesDirectory)\src\SwedbankPay.Sdk\SwedbankPay.Sdk.csproj'
packDirectory: '$(Build.ArtifactStagingDirectory)/packages'
nobuild: true
versioningScheme: 'off'
buildProperties: 'PackageVersion=$(GitVersion.NuGetVersionV2)'
- task: PublishBuildArtifacts@1
displayName: 'Publish .net core build artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
displayName: 'Publish system test project build artifacts'
inputs:
PathtoPublish: 'src\Samples\Sample.AspNetCore.SystemTests'
ArtifactName: 'SystemTests'
publishLocation: 'Container'