Commit 0ead5354 authored by Daniel Scholl's avatar Daniel Scholl
Browse files

Updated

parent 1823d138
......@@ -50,7 +50,7 @@ stages:
skipDeploy: ${{ parameters.skipDeploy }}
hldRegPath: ${{ parameters.hldRegPath }}
- template: tasks/flux-wait.yml
- template: tasks/flux-chart-wait.yml
parameters:
serviceName: ${{parameters.serviceName}}
environment: ${{ environment }}
......
......@@ -75,7 +75,7 @@ steps:
options: ${{ parameters.testCoreMavenOptions }}
publishJUnitResults: ${{ parameters.mavenPublishJUnitResults }}
- template: flux-wait.yml
- template: flux-service-wait.yml
parameters:
serviceName: ${{parameters.serviceName}}
environment: ${{ parameters.environment }}
......
# Copyright � Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This template is responsible for detecting a service being alive.
steps:
- task: AzureCLI@1
displayName: 'Flux Deployment Wait'
env:
SERVICE_NAME: ${{parameters.serviceName}}
BASE_NAME_SR: $(base-name-sr)
inputs:
azureSubscription: '$(SERVICE_CONNECTION_NAME)'
addSpnToEnvironment: true
scriptLocation: inlineScript
inlineScript: |
#!/usr/bin/env bash
set -euo pipefail
echo "Logging in to AKS"
echo "------------------------------------"
sudo az aks install-cli
az aks get-credentials -g $BASE_NAME_SR-rg -n $BASE_NAME_SR-aks
echo "Checking Deployment $SERVICE_NAME Available"
echo "------------------------------------"
attempt_counter=0
max_attempts=30
until kubectl get deployment $SERVICE_NAME -n osdu
do
if [ ${attempt_counter} -eq ${max_attempts} ];then
echo "Deployment Image not updated, integration tests are skipped"
exit 1
fi
attempt_counter=$(($attempt_counter+1))
sleep 30
done
kubectl wait --for=condition=available --timeout=600s deployment/$SERVICE_NAME -n osdu
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment