Browse Source

Set up CI with Azure Pipelines

[skip ci]
staging
yusufkaratoprak 5 years ago
parent
commit
b4200d14ce
  1. 62
      azure-pipelines.yml

62
azure-pipelines.yml

@ -0,0 +1,62 @@
trigger:
- main
variables:
dockerRegistryServiceConnection: 'b46a670b-6940-4de5-b6b1-b06f9dd1c849'
imageRepository: 'voloeventhubhttpapihost'
containerRegistry: 'voloeventhubhttpapihost.azurecr.io'
dockerfilePath: '**/Dockerfile'
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)
- upload: manifests
artifact: manifests
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
jobs:
- deployment: Deploy
displayName: Deploy-HttpApi-Host
pool:
vmImage: $(vmImageName)
environment: 'volosofteventhub-6504.default'
strategy:
runOnce:
deploy:
steps:
- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:
action: deploy
manifests: |
$(Pipeline.Workspace)/manifests/deployment.eventhub.httpapi.host.yml
$(Pipeline.Workspace)/manifests/service.eventhub.httpapi.host.yml
containers: |
$(containerRegistry)/$(imageRepository):$(tag)
Loading…
Cancel
Save