diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 6f33e79..ba3acf3 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -1,5 +1,9 @@ = Changelog +== Version 2.7.1 + +* Fix inverted status check which _fails_ for any 2xx HTTP status + == Version 2.7.0 * Accept any 2xx HTTP status code when deploying Helm charts diff --git a/pom.xml b/pom.xml index 0afe40d..13a1d68 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.deviceinsight.helm helm-maven-plugin - 2.7.0 + 2.7.1 maven-plugin Helm Maven Plugin diff --git a/src/main/kotlin/com/deviceinsight/helm/DeployMojo.kt b/src/main/kotlin/com/deviceinsight/helm/DeployMojo.kt index e742276..40a47b1 100644 --- a/src/main/kotlin/com/deviceinsight/helm/DeployMojo.kt +++ b/src/main/kotlin/com/deviceinsight/helm/DeployMojo.kt @@ -167,7 +167,7 @@ class DeployMojo : AbstractMojo() { httpClient.execute(request).use { response -> val statusCode = response.statusLine.statusCode - if ( (statusCode >= 200) && (statusCode < 300) ) { + if (statusCode < 200 || statusCode >= 300) { throw RuntimeException("Unexpected status code when executing $chartPublishMethod request to " + "chart repo ${chartDeploymentRequest.chartPublishUrl()}: $statusCode") }