From 0fbf4dcdb2ad832b1f24c85dea6207994404b21f Mon Sep 17 00:00:00 2001 From: Yuval Kohavi Date: Fri, 10 May 2019 20:16:21 -0400 Subject: [PATCH] add canary promotion --- test/e2e-gloo-tests.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/e2e-gloo-tests.sh b/test/e2e-gloo-tests.sh index ca4f0505..9984a429 100755 --- a/test/e2e-gloo-tests.sh +++ b/test/e2e-gloo-tests.sh @@ -78,3 +78,26 @@ until ${ok}; do done echo '✔ Canary initialization test passed' + +echo '>>> Triggering canary deployment' +kubectl -n test set image deployment/podinfo podinfod=quay.io/stefanprodan/podinfo:1.4.1 + +echo '>>> Waiting for canary promotion' +retries=50 +count=0 +ok=false +until ${ok}; do + kubectl -n test describe deployment/podinfo-primary | grep '1.4.1' && ok=true || ok=false + sleep 10 + kubectl -n gloo-system logs deployment/flagger --tail 1 + count=$(($count + 1)) + if [[ ${count} -eq ${retries} ]]; then + kubectl -n test describe deployment/podinfo + kubectl -n test describe deployment/podinfo-primary + kubectl -n gloo-system logs deployment/flagger + echo "No more retries left" + exit 1 + fi +done + +echo '✔ Canary promotion test passed'