Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
shamrao shinde, sumedh
2024-11-06 08:08:51 +00:00
parent 012e6eb2bd
commit a43f6d5db5

View File

@@ -31,7 +31,7 @@ steps:
containerRegistry: $(dockerRegistryServiceConnection) containerRegistry: $(dockerRegistryServiceConnection)
repository: '$(imageName)' repository: '$(imageName)'
tags: '$(shortCommitSha)' tags: '$(shortCommitSha)'
Dockerfile: 'apollo-fe/Dockerfile' Dockerfile: 'Dockerfile'
arguments: '--build-arg VITE_BACKEND_URL=http://olympus-api-gateway-aks.olympusai.live/apollo' arguments: '--build-arg VITE_BACKEND_URL=http://olympus-api-gateway-aks.olympusai.live/apollo'
- script: | - script: |
echo "Listing the docker images..." echo "Listing the docker images..."
@@ -40,18 +40,18 @@ steps:
- script: | - script: |
echo "Updating imageName in dpeloyment.yaml" echo "Updating imageName in dpeloyment.yaml"
echo "Before Substitution" echo "Before Substitution"
cat apollo-fe/apollo-fe-deployment.yaml cat apollo-fe-deployment.yaml
echo "###############################################" echo "###############################################"
echo "current shell: $SHELL" echo "current shell: $SHELL"
echo "imagename bracket : $(imageName)" echo "imagename bracket : $(imageName)"
echo "###############################################" echo "###############################################"
sed -i "s|image: olympusreg.azurecr.io/$(imageName):.*|image: olympusreg.azurecr.io/$(imageName):$(shortCommitSha)|" apollo-fe/apollo-fe-deployment.yaml sed -i "s|image: olympusreg.azurecr.io/$(imageName):.*|image: olympusreg.azurecr.io/$(imageName):$(shortCommitSha)|" apollo-fe-deployment.yaml
echo "After Substitution" echo "After Substitution"
cat apollo-fe/apollo-fe-deployment.yaml cat apollo-fe-deployment.yaml
displayName: 'Update ImageName in YAML file' displayName: 'Update ImageName in YAML file'
- script: | - script: |
echo "deployment using kubectl" echo "deployment using kubectl"
kubectl apply -f apollo-fe/apollo-fe-deployment.yaml kubectl apply -f apollo-fe-deployment.yaml
displayName: 'deployment using kubectl' displayName: 'deployment using kubectl'
- script: | - script: |
echo "remove the docker images..." echo "remove the docker images..."