-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
72 lines (57 loc) · 1.64 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
trigger: none
pr: none
resources:
- repo: self
variables:
- name: tag
value: $(Build.SourceBranchName).$(Build.BuildNumber).$(Build.BuildId)
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: ubuntu-22.04
steps:
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: 'test'
projects: '**/tests/*'
- task: DockerCompose@0
displayName: Multi Container Build
inputs:
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'DockerHub'
dockerComposeFile: '**/docker-compose.yml'
action: 'Build services'
additionalImageTags: $(tag)
- task: DockerCompose@0
displayName: Multi Container Push
inputs:
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'DockerHub'
dockerComposeFile: '**/docker-compose.yml'
action: 'Push services'
additionalImageTags: $(tag)
- task: replacetokens@5
displayName: Replace YAML Tokens
inputs:
targetFiles: '**/k8s/_deploy/*.yml'
encoding: 'auto'
tokenPattern: 'azpipelines'
writeBOM: true
actionOnMissing: 'warn'
keepToken: true
actionOnNoFiles: 'continue'
enableTransforms: false
enableRecursion: false
useLegacyPattern: false
enableTelemetry: true
- task: PublishBuildArtifacts@1
displayName: Publish Manifests
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/k8s/_deploy'
ArtifactName: 'drop'
publishLocation: 'Container'