-
Notifications
You must be signed in to change notification settings - Fork 0
/
client-swagger-codegen.yml
58 lines (48 loc) · 1.42 KB
/
client-swagger-codegen.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
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
csproject: '**/*.csproj'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
restClientPackageName: 'ECommerce.Rest.Client.Api'
steps:
# For swagger-codegen
- template: codegen-run.yml
parameters:
apiVersions: ["v1", "v2"]
workingDirectory: '$(Build.Repository.LocalPath)'
restClientPackageName: '$(restClientPackageName)'
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
displayName: 'nuget restore'
inputs:
command: 'restore'
restoreSolution: '**/*Rest.Client*.sln'
feedsToUse: 'select'
# For swagger-codegen
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
projects: |
**/*Rest.Client*.csproj
!**/*.Test.csproj
arguments: '--configuration $(buildConfiguration)'
# For swagger-codegen
- task: NuGetCommand@2
displayName: 'dotnet pack'
inputs:
command: 'pack'
packagesToPack: '**/*Rest.Client*.csproj;!**/*.Test.csproj'
versioningScheme: 'byBuildNumber'
- task: NuGetCommand@2
displayName: 'nuget push'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '46a4dd82-34fb-4605-9cd7-d70020e50202/c82446dc-a554-4e59-b571-ce7f95e14cd7'