diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 86e3662..d4e2b1a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,16 +34,17 @@ stages: - script: | echo "Building the first repository..." + pwd ls -lrth displayName: 'list files' - - task: Maven@3 + - task: Maven@4 inputs: mavenPomFile: 'olympus-common/pom.xml' goals: 'install' displayName: 'Build olympus-common' - - task: Maven@3 + - task: Maven@4 inputs: mavenPomFile: 'hermione/pom.xml' goals: 'install -DskipTests' @@ -68,8 +69,15 @@ stages: docker images displayName: 'List docker images' - - upload: hermione/manifests - artifact: manifests + - script: | + echo "Removing Docker images to clean up..." + docker rmi $(docker images -q) + displayName: 'Clean up Docker Images' + continueOnError: true + condition: always() + + #- upload: hermione/manifests + # artifact: manifests - stage: Deploy displayName: Deploy stage @@ -88,6 +96,7 @@ stages: runOnce: deploy: steps: + - checkout: self - script: | echo "##vso[task.setvariable variable=shortCommitSha]$(echo $(Build.SourceVersion) | cut -c1-8)" displayName: 'Set Short Commit SHA' @@ -97,18 +106,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/hermione-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() \ No newline at end of file + $(azurecontainerRegistry)/$(imageName):$(shortCommitSha) \ No newline at end of file