From a7fe1cf97e57255b88fbd766155dadee0d89805a Mon Sep 17 00:00:00 2001 From: Jakub Scholz Date: Sun, 30 Jun 2024 20:10:09 +0200 Subject: [PATCH] Fix pushing of artifacts to Nexus (#913) Signed-off-by: Jakub Scholz Signed-off-by: Antonio Pedro --- .azure/scripts/push-to-nexus.sh | 19 +++++++++++++------ pom.xml | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.azure/scripts/push-to-nexus.sh b/.azure/scripts/push-to-nexus.sh index f96722c7e..771569ba3 100755 --- a/.azure/scripts/push-to-nexus.sh +++ b/.azure/scripts/push-to-nexus.sh @@ -1,16 +1,23 @@ #!/usr/bin/env bash +set -e + echo "Build reason: ${BUILD_REASON}" echo "Source branch: ${BRANCH}" -GPG_TTY=$(tty) -export GPG_TTY +function cleanup() { + rm -rf signing.gpg + gpg --delete-keys + gpg --delete-secret-keys +} + +# Run the cleanup on failure / exit +trap cleanup EXIT -echo "$GPG_SIGNING_KEY" | base64 -d > signing.gpg +export GPG_TTY=$(tty) +echo $GPG_SIGNING_KEY | base64 -d > signing.gpg gpg --batch --import signing.gpg GPG_EXECUTABLE=gpg mvn $MVN_ARGS -DskipTests -s ./.azure/scripts/settings.xml -P ossrh verify deploy -rm -rf signing.gpg -gpg --delete-keys -gpg --delete-secret-keys \ No newline at end of file +cleanup \ No newline at end of file diff --git a/pom.xml b/pom.xml index b030ae86b..814475bb8 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ 3.2.1 3.3.0 3.0.1 - 1.6.7 + 1.7.0 1.3.7 1.3.4 2.16.1