Skip to content

Commit

Permalink
Fix pushing of artifacts to Nexus (#70)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <www@scholzj.com>
  • Loading branch information
scholzj authored Jun 30, 2024
1 parent 5be2526 commit b157705
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 11 additions & 4 deletions .azure/scripts/push_to_nexus.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/usr/bin/env bash
set -e

export GPG_TTY=$(tty)
function cleanup() {
rm -rf signing.gpg
gpg --delete-keys
gpg --delete-secret-keys
}

# Run the cleanup on failure / exit
trap cleanup EXIT

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
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
<organization>Red Hat</organization>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
<developer>
<name>Lukáš Král</name>
<email>l.kral@outlook.com</email>
<organization>Red Hat</organization>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
<developer>
<name>Maros Orsak</name>
<email>morsak@redhat.com</email>
Expand Down Expand Up @@ -111,7 +117,7 @@
<maven.source-plugin.version>3.0.1</maven.source-plugin.version>
<maven.checkstyle.version>3.1.1</maven.checkstyle.version>
<maven.gpg.version>1.6</maven.gpg.version>
<sonatype.nexus.staging>1.6.13</sonatype.nexus.staging>
<sonatype.nexus.staging>1.7.0</sonatype.nexus.staging>

<!-- FIX VULNERABILITY VERSIONS -->
<commons-compress.version>1.26.1</commons-compress.version>
Expand Down

0 comments on commit b157705

Please sign in to comment.