-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
86 lines (76 loc) · 3.05 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
81
82
83
84
resources:
containers:
- container: postgres
image: postgres
env:
POSTGRES_USER: brc
POSTGRES_PASSWORD: 123
ports:
- 5432:5432
variables:
Version: 3.1.$(Build.BuildId)
BE_POSTGRES_HOST: localhost
BE_POSTGRES_USERNAME: brc
BE_POSTGRES_PASSWORD: 123
BE_POSTGRES_PORT: 5432
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: Ubuntu 16.04
steps:
- task: UseDotNet@2
displayName: 'Install .Net Core 3.1'
inputs:
packageType: sdk
version: 3.1.401
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: test
publishTestResults: true
projects: 'tests/**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Create package'
inputs:
command: pack
configuration: Release
versioningScheme: byEnvVar
versionEnvVar: Version
verbosityPack: minimal
projects: src/**/*.csproj
- task: PublishPipelineArtifact@0
displayName: 'Publish package as artifact'
inputs:
artifactName: 'packages'
targetPath: '$(Build.ArtifactStagingDirectory)'
services:
postgres: postgres
- stage: Deploy
dependsOn: Build
condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/master'))
jobs:
- job: Publish
pool:
vmImage: Ubuntu 16.04
steps:
- download: current
artifact: packages
- task: DotNetCoreCLI@2
displayName: 'Push package to internal feed'
inputs:
command: push
nuGetFeedType: internal
publishVstsFeed: BioEngine
versioningScheme: byEnvVar
versionEnvVar: Version
searchPatternPush: '$(Pipeline.Workspace)/**/*.nupkg'
- task: NuGetCommand@2
displayName: 'Push package to nuget'
inputs:
command: 'push'
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'BRC Nuget'