-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
61 lines (58 loc) · 2.26 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
trigger:
batch: true
branches:
include:
- master
pool:
vmImage: 'Ubuntu-16.04'
variables:
BuildConfiguration: 'release'
DockerHubUser: 'leon99'
steps:
- pwsh: |
dotnet build --configuration $(BuildConfiguration) Monyk.sln
displayName: 'dotnet build $(BuildConfiguration)'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- pwsh: |
dotnet test --logger trx Monyk.sln
displayName: 'dotnet test $(BuildConfiguration)'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- pwsh: |
dotnet publish --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)/GroundControl src/Monyk.GroundControl.Main
dotnet publish --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)/Probe src/Monyk.Probe.Main
dotnet publish --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)/Lab src/Monyk.Lab.Main
displayName: 'dotnet publish $(BuildConfiguration)'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- pwsh: |
docker build $(Build.ArtifactStagingDirectory)/GroundControl `
--file src/Monyk.GroundControl.Main/ci.Dockerfile `
--tag $(DockerHubUser)/monyk-groundcontrol:$(build.buildNumber) `
--tag $(DockerHubUser)/monyk-groundcontrol:latest `
--build-arg mainFileName=Monyk.GroundControl.Main
docker build $(Build.ArtifactStagingDirectory)/Probe `
--file src/Monyk.Probe.Main/ci.Dockerfile `
--tag $(DockerHubUser)/monyk-probe:$(build.buildNumber) `
--tag $(DockerHubUser)/monyk-probe:latest `
--build-arg mainFileName=Monyk.Probe.Main
docker build $(Build.ArtifactStagingDirectory)/Lab `
--file src/Monyk.Lab.Main/ci.Dockerfile `
--tag $(DockerHubUser)/monyk-lab:$(build.buildNumber) `
--tag $(DockerHubUser)/monyk-lab:latest `
--build-arg mainFileName=Monyk.Lab.Main
displayName: 'docker build'
- pwsh: |
$env:DOCKER_PWD | docker login -u $(DockerHubUser) --password-stdin
docker push $(DockerHubUser)/monyk-groundcontrol
docker push $(DockerHubUser)/monyk-probe
docker push $(DockerHubUser)/monyk-lab
env:
DOCKER_PWD: $(dockerHubPwd)
- task: PublishBuildArtifacts@1