-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.tracker.yml
54 lines (42 loc) · 1.33 KB
/
azure-pipelines.tracker.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
trigger: none
pool:
vmImage: 'ubuntu-latest'
demands:
- msbuild
- visualstudio
variables:
BuildPlatform: 'any cpu'
BuildConfiguration: 'release'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: true
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 6.3'
inputs:
versionSpec: '6.3.x'
- task: DockerInstaller@0
inputs:
dockerVersion: '17.09.0-ce'
- task: PowerShell@2
displayName: 'Docker login'
inputs:
targetType: 'inline'
script: 'docker login registry.assistantapps.com -u assistantApps -p $(dockerPass)'
- task: PowerShell@2
displayName: 'Docker Build, Tag & Push'
inputs:
targetType: 'inline'
script: |
docker build -t assistantnms-tracker -f Dockerfile.tracker .
$version = '0.' + $(Build.BuildId)
docker tag assistantnms-tracker registry.assistantapps.com/assistantnms-tracker:latest
docker tag assistantnms-tracker registry.assistantapps.com/assistantnms-tracker:$version
docker push registry.assistantapps.com/assistantnms-tracker:latest
docker push registry.assistantapps.com/assistantnms-tracker:$version
$version | Out-File -FilePath "$(build.artifactstagingdirectory)/version.txt"
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact - Tracker version'
inputs:
ArtifactName: TrackerVersion