Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
VladVascan 2019-05-30 15:07:33 +01:00
parent 9d27619db6
commit f13a6252a9

View file

@ -18,7 +18,7 @@ variables:
tag: '$(Build.BuildId)' tag: '$(Build.BuildId)'
# Kubernetes Namespace # Kubernetes Namespace
k8sNamespace: '{{ k8sResource.Namespace }}' mbankpoc: '{{ mbankpoc.Namespace }}'
imagePullSecret: '{{#toAlphaNumericString containerRegistryConnection.Name 50}}{{/toAlphaNumericString}}{{#shortGuid}}{{/shortGuid}}-auth' imagePullSecret: '{{#toAlphaNumericString containerRegistryConnection.Name 50}}{{/toAlphaNumericString}}{{#shortGuid}}{{/shortGuid}}-auth'
# Agent VM image name # Agent VM image name
@ -56,7 +56,7 @@ stages:
displayName: Deploy displayName: Deploy
pool: pool:
vmImage: $(vmImageName) vmImage: $(vmImageName)
environment: '{{ k8sResource.EnvironmentReference.Name }}.{{ k8sResource.Name }}' environment: '{{ mbankpoc.EnvironmentReference.Name }}.{{ mbankpoc.Name }}'
strategy: strategy:
runOnce: runOnce:
deploy: deploy:
@ -66,14 +66,14 @@ stages:
inputs: inputs:
action: createSecret action: createSecret
secretName: $(imagePullSecret) secretName: $(imagePullSecret)
namespace: $(k8sNamespace) namespace: $(mbankpoc)
dockerRegistryEndpoint: $(dockerRegistryServiceConnection) dockerRegistryEndpoint: $(dockerRegistryServiceConnection)
- task: KubernetesManifest@0 - task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster displayName: Deploy to Kubernetes cluster
inputs: inputs:
action: deploy action: deploy
namespace: $(k8sNamespace) namespace: $(mbankpoc)
manifests: | manifests: |
$(System.ArtifactsDirectory)/manifests/deployment.yml $(System.ArtifactsDirectory)/manifests/deployment.yml
$(System.ArtifactsDirectory)/manifests/service.yml $(System.ArtifactsDirectory)/manifests/service.yml