Skip to content

Commit

Permalink
Fix pushing of artifacts to Nexus (strimzi#913)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <[email protected]>
Signed-off-by: Antonio Pedro <[email protected]>
  • Loading branch information
scholzj authored and antonio-pedro99 committed Jul 22, 2024
1 parent d0e4043 commit a7fe1cf
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 @@ -119,7 +119,7 @@
<maven.source.version>3.2.1</maven.source.version>
<maven.dependency.version>3.3.0</maven.dependency.version>
<maven.gpg.version>3.0.1</maven.gpg.version>
<sonatype.nexus.staging>1.6.7</sonatype.nexus.staging>
<sonatype.nexus.staging>1.7.0</sonatype.nexus.staging>
<swagger2markup-plugin.version>1.3.7</swagger2markup-plugin.version>
<swagger2markup.version>1.3.4</swagger2markup.version>
<jackson-core.version>2.16.1</jackson-core.version>
Expand Down

0 comments on commit a7fe1cf

Please sign in to comment.