From fef642ce60a4c6a13c4fe2a8f92dbf0eba32dbb7 Mon Sep 17 00:00:00 2001 From: Jakub Scholz Date: Sun, 30 Jun 2024 20:31:04 +0200 Subject: [PATCH] Fix pushing of artifacts to Nexus (#242) Signed-off-by: Jakub Scholz --- .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 2c6cced8..3e0b7a9f 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 -pl '!examples/producer','!examples/consumer' -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 8c98a7bd..fea02d14 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ 3.2.1 3.3.0 4.7.3 - 1.6.3 + 1.7.0 3.7.0 2.15.3 2.15.3