Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
shamrao shinde, sumedh
2024-11-08 07:34:32 +00:00
parent 3928033662
commit 4f4b0751b0

View File

@@ -80,6 +80,10 @@ stages:
steps:
- checkout: self
- script: |
echo "##vso[task.setvariable variable=shortCommitSha]$(echo $(Build.SourceVersion) | cut -c1-8)"
displayName: 'Set Short Commit SHA'
- script: |
echo $(shortCommitSha)
echo "Updating imageName in deployment.yaml"
@@ -94,6 +98,11 @@ stages:
cat apollo-deployment.yaml
displayName: 'Update ImageName in YAML file'
- script: |
echo "deployment using kubectl"
kubectl apply -f apollo-deployment.yaml
displayName: 'Deployment using kubectl'
- script: |
echo "Removing Docker images to clean up..."
docker rmi $(docker images -q)