Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
shamrao shinde, sumedh
2024-12-06 12:13:42 +00:00
parent 9e60a23438
commit 197569c55d

View File

@@ -28,6 +28,7 @@ stages:
- script: | - script: |
echo "Building the first repository..." echo "Building the first repository..."
pwd
ls -lrth ls -lrth
displayName: 'list files' displayName: 'list files'
@@ -71,8 +72,8 @@ stages:
docker images docker images
displayName: 'List docker images after removal' displayName: 'List docker images after removal'
- upload: manifests #- upload: manifests
artifact: manifests # artifact: manifests
- stage: Deploy - stage: Deploy
displayName: Deploy stage displayName: Deploy stage
@@ -91,6 +92,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'
@@ -100,10 +103,11 @@ 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/hermione-fe-deployment.yaml $(Pipeline.Workspace)/manifests/hermione-fe-deployment.yaml
containers: | containers: |