forked from microsoft/presidio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-ci.yml
71 lines (66 loc) · 2.3 KB
/
azure-pipelines-ci.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
# Presidio CI: lint, build, unit test, e2e tests, push to private Azure Container registry, deploy to dev demo
trigger:
batch: true
branches:
include:
- main
variables:
- group: Presidio-V2-CI
stages:
- template: .pipelines/templates/lint-build-test.yml
- stage: PushContainersAndE2ETests
displayName: E2E Tests
dependsOn: LintBuildTest
jobs:
- job: BuildAndPushContainers
displayName: Build and Push Containers
pool:
vmImage: 'ubuntu-latest'
variables:
REGISTRY_NAME: '$(ACR_REGISTRY_NAME).azurecr.io/'
TAG: ':$(Build.BuildId)'
steps:
- template: .pipelines/templates/build-and-push-containers.yml
parameters:
REGISTRY_NAME: $(REGISTRY_NAME)
TAG: $(TAG)
AZURE_SUBSCRIPTION: $(ACR_AZURE_SUBSCRIPTION)
- job: E2ETests
displayName: E2E Tests
dependsOn:
- 'BuildAndPushContainers'
pool:
vmImage: 'ubuntu-latest'
variables:
REGISTRY_NAME: '$(ACR_REGISTRY_NAME).azurecr.io/'
TAG: ':$(Build.BuildId)'
steps:
- task: DockerCompose@0
displayName: Pull Presidio Images from ACR
inputs:
action: Run a Docker Compose command
dockerComposeCommand: pull
dockerComposeFile: docker-compose.yml
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'presidio-acr'
dockerComposeFileArgs: |
REGISTRY_NAME=$(REGISTRY_NAME)
TAG=$(TAG)
- template: .pipelines/templates/e2e-tests.yml
- stage: DeployDev
condition: false
dependsOn: PushContainersAndE2ETests
variables:
REGISTRY_NAME: '$(ACR_REGISTRY_NAME).azurecr.io/'
displayName: Deploy
jobs:
- template: .pipelines/templates/deploy-stage.yml
parameters:
ENVIRONMNT_NAME: Dev
REGISTRY_NAME: $(REGISTRY_NAME)
AZURE_SUBSCRIPTION: $(DEV_AZURE_SUBSCRIPTION)
ANALYZER_APP_NAME: $(ANALYZER_DEV_APP_NAME)
ANONYMIZER_APP_NAME: $(ANONYMIZER_DEV_APP_NAME)
IMAGE_REDACTOR_APP_NAME: $(IMAGE_REDACTOR_DEV_APP_NAME)
RESOURCE_GROUP_NAME: $(DEV_RESOURCE_GROUP_NAME)
TAG: $(Build.BuildId)