From a158fe6ab9a66b025634e862771466638597e628 Mon Sep 17 00:00:00 2001 From: Wei Huang <38430224+weih-kahoot@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:15:06 +0200 Subject: [PATCH] Log remote status when push release task failed (#829) Similar to what's been done in PR #685 for release task. --- .../pl/allegro/tech/build/axion/release/PushReleaseTask.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/groovy/pl/allegro/tech/build/axion/release/PushReleaseTask.groovy b/src/main/groovy/pl/allegro/tech/build/axion/release/PushReleaseTask.groovy index 4098e9e4..ea1eb637 100644 --- a/src/main/groovy/pl/allegro/tech/build/axion/release/PushReleaseTask.groovy +++ b/src/main/groovy/pl/allegro/tech/build/axion/release/PushReleaseTask.groovy @@ -16,7 +16,9 @@ abstract class PushReleaseTask extends BaseAxionTask { ScmPushResult result = releaser.pushRelease() if (result.outcome === ScmPushResultOutcome.FAILED) { + def status = result.failureStatus def message = result.remoteMessage.orElse("Unknown error during push") + logger.error("remote status: ${status}") logger.error("remote message: ${message}") throw new ReleaseFailedException(message) }