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