Skip to content

Commit

Permalink
Fix pushing of artifacts to Nexus (#51)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <[email protected]>
  • Loading branch information
scholzj authored Jun 30, 2024
1 parent 61aa537 commit 4998f25
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .azure/scripts/push-to-nexus.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
#!/usr/bin/env bash

set -e

echo "Build reason: ${BUILD_REASON}"
echo "Source branch: ${BRANCH}"

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
20 changes: 19 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@
<organization>Red Hat</organization>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
<developer>
<name>Paul Mellor</name>
<email>[email protected]</email>
<organization>Red Hat</organization>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
<developer>
<name>Lukáš Král</name>
<email>[email protected]</email>
<organization>Red Hat</organization>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
<developer>
<name>Maroš Orsák</name>
<email>[email protected]</email>
<organization>Red Hat</organization>
<organizationUrl>https://www.redhat.com</organizationUrl>
</developer>
</developers>

<properties>
Expand All @@ -90,7 +108,7 @@
<checkstyle.version>9.2.1</checkstyle.version>
<maven.spotbugs.version>4.5.3.0</maven.spotbugs.version>
<spotbugs.version>4.7.2</spotbugs.version>
<sonatype.nexus.staging>1.6.3</sonatype.nexus.staging>
<sonatype.nexus.staging>1.7.0</sonatype.nexus.staging>
<jacoco.version>0.7.9</jacoco.version>
<license.maven.version>2.11</license.maven.version>
<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
Expand Down

0 comments on commit 4998f25

Please sign in to comment.