From ea1d98d3cb662dc39ada7d972f0fbee6f5506020 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Fri, 9 Sep 2016 12:12:36 +0300 Subject: [PATCH] fix retry logic --- .../jenkins/plugin/ecs/deploy/steps/UpdateServiceStep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/zeroturnaround/jenkins/plugin/ecs/deploy/steps/UpdateServiceStep.java b/src/main/java/com/zeroturnaround/jenkins/plugin/ecs/deploy/steps/UpdateServiceStep.java index 52f930a..c76cec9 100644 --- a/src/main/java/com/zeroturnaround/jenkins/plugin/ecs/deploy/steps/UpdateServiceStep.java +++ b/src/main/java/com/zeroturnaround/jenkins/plugin/ecs/deploy/steps/UpdateServiceStep.java @@ -98,7 +98,7 @@ public void perform(AmazonECS ecs, AbstractBuild build, Launcher launcher, if ("PRIMARY".equalsIgnoreCase(deployment.getStatus())) { // Retry if it's PRIMARY and desired !== running - shouldRetry = shouldRetry || deployment.getDesiredCount().equals(deployment.getRunningCount()); + shouldRetry = shouldRetry || !deployment.getDesiredCount().equals(deployment.getRunningCount()); } else { // Retry if we found a non-primary task shouldRetry = true;