Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
@@ -59,8 +59,15 @@ stages:
|
|||||||
docker images
|
docker images
|
||||||
displayName: 'List docker images'
|
displayName: 'List docker images'
|
||||||
|
|
||||||
- upload: manifests
|
- script: |
|
||||||
artifact: manifests
|
echo "Removing Docker images to clean up..."
|
||||||
|
docker rmi $(docker images -q)
|
||||||
|
displayName: 'Clean up Docker Images'
|
||||||
|
continueOnError: true
|
||||||
|
condition: always()
|
||||||
|
|
||||||
|
#- upload: manifests
|
||||||
|
# artifact: manifests
|
||||||
|
|
||||||
- stage: Deploy
|
- stage: Deploy
|
||||||
displayName: Deploy stage
|
displayName: Deploy stage
|
||||||
@@ -79,6 +86,8 @@ stages:
|
|||||||
runOnce:
|
runOnce:
|
||||||
deploy:
|
deploy:
|
||||||
steps:
|
steps:
|
||||||
|
- checkout: self # Check out the pipeline repository (optional)
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
echo "##vso[task.setvariable variable=shortCommitSha]$(echo $(Build.SourceVersion) | cut -c1-8)"
|
echo "##vso[task.setvariable variable=shortCommitSha]$(echo $(Build.SourceVersion) | cut -c1-8)"
|
||||||
displayName: 'Set Short Commit SHA'
|
displayName: 'Set Short Commit SHA'
|
||||||
@@ -88,18 +97,12 @@ stages:
|
|||||||
echo "Short Commit SHA: $(shortCommitSha)"
|
echo "Short Commit SHA: $(shortCommitSha)"
|
||||||
displayName: 'Echo short commit SHA'
|
displayName: 'Echo short commit SHA'
|
||||||
|
|
||||||
- task: KubernetesManifest@0
|
- task: KubernetesManifest@1
|
||||||
displayName: Deploy to Kubernetes cluster
|
displayName: Deploy to Kubernetes cluster
|
||||||
inputs:
|
inputs:
|
||||||
action: deploy
|
action: deploy
|
||||||
|
namespace: olympus
|
||||||
manifests: |
|
manifests: |
|
||||||
$(Pipeline.Workspace)/manifests/apollo-fe-deployment.yaml
|
$(Pipeline.Workspace)/manifests/apollo-fe-deployment.yaml
|
||||||
containers: |
|
containers: |
|
||||||
$(azurecontainerRegistry)/$(imageName):$(shortCommitSha)
|
$(azurecontainerRegistry)/$(imageName):$(shortCommitSha)
|
||||||
|
|
||||||
- script: |
|
|
||||||
echo "Removing Docker images to clean up..."
|
|
||||||
docker rmi $(docker images -q)
|
|
||||||
displayName: 'Clean up Docker Images'
|
|
||||||
continueOnError: true
|
|
||||||
condition: always()
|
|
||||||
Reference in New Issue
Block a user