-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
80 lines (70 loc) · 1.98 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
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/*
- azure-pipelines.yml
pr:
branches:
include:
- "*"
pool:
vmImage: windows-latest
variables:
- group: simplic-deployment
- group: simplic-deployment-dev01
- name: buildConfiguration
value: "Release"
resources:
repositories:
- repository: infrastructure
type: github
name: simplic/build-infrastructure
endpoint: simplic-bot
steps:
- checkout: self
persistCredentials: true
- task: NuGetToolInstaller@1
inputs:
versionSpec: 5.x
- task: NuGetCommand@2
inputs:
command: restore
restoreSolution: "**/*.sln"
feedsToUse: select
vstsFeed: f7087ef5-bf6f-48b2-8b8b-5e513f4a7a9e
- task: MSBuild@1
inputs:
solution: "**/*.sln"
configuration: $(buildConfiguration)
- ${{ if not(eq(variables['Build.Reason'], 'PullRequest')) }}:
- template: version-number-update-token-template.yml@infrastructure
parameters:
connection_string: $(connection_string)
git_user: $(git_user)
git_token: $(git_token)
branch_name: ${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }}
- task: VSTest@2
inputs:
testSelector: testAssemblies
testAssemblyVer2: |
**\Simplic.CoreLib.*.dll
!**\*TestAdapter.dll
!**\obj\**
- task: NuGetCommand@2
inputs:
command: pack
packagesToPack: src/Simplic.CoreLib/Simplic.CoreLib.csproj
configuration: $(buildConfiguration)
versioningScheme: "off"
- task: NuGetCommand@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: push
packagesToPush: $(Build.ArtifactStagingDirectory)/Simplic.CoreLib.*.nupkg;!$(Build.ArtifactStagingDirectory)/Simplic.CoreLib.*.symbols.nupkg
nuGetFeedType: internal
publishVstsFeed: f7087ef5-bf6f-48b2-8b8b-5e513f4a7a9e
allowPackageConflicts: true