From d69c35a1db2faf4bd534b70c19ea017205e28e59 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 23 Jul 2020 18:23:24 -0700 Subject: [PATCH] Deal with 404 response when checking for artifacts --- .../concourse/releasescripts/bintray/BintrayService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java b/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java index 80ca5fa41f..7a224f3262 100644 --- a/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java +++ b/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java @@ -101,8 +101,13 @@ public class BintrayService { try { waitAtMost(timeout).with().pollDelay(Duration.ZERO).pollInterval(pollInterval).until(() -> { logger.debug("Checking bintray"); - PackageFile[] published = this.restTemplate.exchange(request, PackageFile[].class).getBody(); - return hasPublishedAll(published, requiredDigests); + try { + PackageFile[] published = this.restTemplate.exchange(request, PackageFile[].class).getBody(); + return hasPublishedAll(published, requiredDigests); + } + catch (HttpClientErrorException.NotFound ex) { + return false; + } }); } catch (ConditionTimeoutException ex) {