-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
66 lines (58 loc) · 1.75 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
trigger:
- master
resources:
- repo: self
variables:
buildConfiguration: release
targetFramework: net5.0
sdkVersion: 5.0.100
projectFile: aiof.auth.core/aiof.auth.core.csproj
projectFileTest: aiof.auth.tests/aiof.auth.tests.csproj
tag: latest
stages:
- stage: Build
displayName: Build
jobs:
- job: Build
displayName: Build
pool:
vmImage: ubuntu-latest
steps:
- task: UseDotNet@2
displayName: install .net5 sdk
inputs:
packageType: sdk
version: $(sdkVersion)
- task: DotNetCoreCLI@2
displayName: build
inputs:
command: build
projects: $(projectFile)
arguments: -c $(buildConfiguration) -f $(targetFramework)
- task: DotNetCoreCLI@2
displayName: test
inputs:
command: test
projects: $(projectFileTest)
arguments: -c $(buildConfiguration) /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/coverage.cobertura.xml
publishTestResults: true
- task: PublishCodeCoverageResults@1
displayName: publish test code coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)/TestResults/Coverage/coverage.cobertura.xml
- task: DotNetCoreCLI@2
displayName: publish
inputs:
command: publish
arguments: -c $(buildConfiguration) -o app/publish -f $(targetFramework)
zipAfterPublish: false
- task: Docker@2
displayName: docker build and push
inputs:
containerRegistry: gkama-docker-cr
repository: gkama/aiof-auth
command: buildAndPush
Dockerfile: $(Build.SourcesDirectory)/Dockerfile
tags: |
$(tag)