forked from silentpartnersoftware/Keycloak.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
64 lines (53 loc) · 1.58 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
variables:
majorVersion: 25
minorVersion: $[counter(variables['majorVersion'], 0)]
version: $[format('{0}.{1}', variables['majorVersion'], variables['minorVersion'])]
name: $(version)
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: nettasks
jobs:
- job: test
condition: eq(1,2) # This condition will skip this job completely
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
restoreArguments:
projects: 'test/**/*.csproj'
- task: DotNetCoreCLI@2
continueOnError: true
inputs:
command: 'test'
projects: 'test/**/*.csproj'
- job: build
# dependsOn: test
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest')) # only for pr's
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: 'src/**/*.csproj'
- job: deploy
# dependsOn: test
condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest'))) # dont't run for pr's
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: 'src/**/*.csproj'
- task: DotNetCoreCLI@2
inputs:
command: 'pack'
packagesToPack: 'src/**/*.csproj'
versioningScheme: 'byEnvVar'
versionEnvVar: version
- task: DotNetCoreCLI@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '53b99a77-b93a-4904-8ad0-8004a351c673'