Open-source event organizing web application and a reference DDD solution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

72 lines
2.0 KiB

# Deploy to Azure Kubernetes Service
# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- main
variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: 'be4690ca-0fbe-4473-a10e-c45c2a32a3c1'
imageRepository: 'voloeventhubhttpapihost'
containerRegistry: 'voloeventhubhttpapihost.azurecr.io'
dockerfilePath: '**/Dockerfile.EventHub.HttpApi.Host'
tag: '$(Build.BuildNumber)'
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: $(dockerfilePath)
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)
- publish: manifests
artifact: manifests
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
jobs:
- deployment: Deploy
displayName: Deploy-HttpApi.Host
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 30 # how much time to give 'run always even if cancelled tasks' before stopping them
pool:
vmImage: $(vmImageName)
environment: 'voloeventhubhttpapihost.default'
strategy:
runOnce:
deploy:
steps:
- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:
action: deploy
namespace: default
manifests: |
$(Pipeline.Workspace)/manifests/deployment.eventhub.httpapi.host.yml
$(Pipeline.Workspace)/manifests/service.eventhub.httpapi.host.yml
containers: |
$(containerRegistry)/$(imageRepository):$(tag)