diff --git a/pom.xml b/pom.xml index 4757637..d55aa60 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,14 @@ https://github.com/spring-cloud/spring-cloud-bindings + + + scb-team + Spring Cloud Bindings Team + https://github.com/spring-cloud/spring-cloud-bindings/graphs/contributors + + + 1.8 3.0.2 @@ -33,6 +41,8 @@ 3.8.1 3.2.1 2.22.2 + 3.0.1 + 3.4.1 ${java.version} ${java.version} @@ -124,6 +134,39 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + org.apache.maven.plugins maven-surefire-plugin diff --git a/scripts/Dockerfile b/scripts/Dockerfile index a73df99..61c4962 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -1,6 +1,8 @@ ARG base_image=ubuntu:bionic FROM ${base_image} +ADD https://repo.spring.io/libs-release/io/spring/concourse/releasescripts/concourse-release-scripts/0.3.2/concourse-release-scripts-0.3.2.jar /opt/concourse-release-scripts.jar + RUN apt-get update && apt-get install --no-install-recommends -y \ - git \ + git gnupg \ && rm -rf /var/lib/apt/lists/* diff --git a/scripts/deploy.sh b/scripts/deploy.sh index aafa960..7a85306 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -4,6 +4,29 @@ set -euo pipefail [[ -d "${PWD}"/maven && ! -d "${HOME}"/.m2 ]] && ln -s "${PWD}"/maven "${HOME}"/.m2 +function clean_gpg { + FINGERPRINT=$(gpg --list-keys | head -4 | tail -1 | tr -d ' ') + gpg --batch --yes --delete-secret-keys "$FINGERPRINT" + gpg --batch --yes --delete-keys "$FINGERPRINT" +} + +trap clean_gpg EXIT +gpg --batch --import-options import-show --import <(echo "$MAVEN_GPG_PRIVATE_KEY") + +mkdir -p ~/.m2 +cat < ~/.m2/settings.xml + + + + gpg.passphrase + ${MAVEN_GPG_PASSPHRASE} + + + +EOF + REPOSITORY="${PWD}"/repository cd source diff --git a/scripts/promote-to-maven-central.sh b/scripts/promote-to-maven-central.sh new file mode 100644 index 0000000..5d38b82 --- /dev/null +++ b/scripts/promote-to-maven-central.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export BUILD_INFO_LOCATION=$(pwd)/repository/build-info.json + +java -jar /opt/concourse-release-scripts.jar publishToCentral 'RELEASE' "$BUILD_INFO_LOCATION" repository + +echo "Sync complete" \ No newline at end of file