Skip to content

Commit

Permalink
Fix pushing of artifacts to Nexus
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <[email protected]>
  • Loading branch information
scholzj committed Jun 30, 2024
1 parent 4c1fd9e commit 9f82b2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
19 changes: 13 additions & 6 deletions .azure/scripts/push-to-nexus.sh
Original file line number Diff line number Diff line change
@@ -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
cleanup
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<maven.jar.version>3.3.0</maven.jar.version>
<maven.assembly.version>3.4.2</maven.assembly.version>
<maven.gpg.version>3.1.0</maven.gpg.version>
<sonatype.nexus.staging>1.6.13</sonatype.nexus.staging>
<sonatype.nexus.staging>1.7.0</sonatype.nexus.staging>

<kafka.version>3.7.0</kafka.version>
<prometheus.version>1.3.1</prometheus.version>
Expand Down

0 comments on commit 9f82b2e

Please sign in to comment.