зеркало из https://github.com/microsoft/presidio.git
73 строки
2.3 KiB
YAML
73 строки
2.3 KiB
YAML
# 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
|
|
projectName: 'microsoft_presidio'
|
|
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)
|