From 8aef2afc47be7f086d1729e744759f02f9981882 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 21 Sep 2018 15:36:29 -0700 Subject: [PATCH 01/13] Add Kokoro release scripts --- .kokoro/release/common.cfg | 37 ++++++++++++++++++++++++++++ .kokoro/release/common.sh | 48 +++++++++++++++++++++++++++++++++++++ .kokoro/release/drop.cfg | 7 ++++++ .kokoro/release/drop.sh | 23 ++++++++++++++++++ .kokoro/release/promote.cfg | 7 ++++++ .kokoro/release/promote.sh | 23 ++++++++++++++++++ .kokoro/release/stage.cfg | 7 ++++++ .kokoro/release/stage.sh | 31 ++++++++++++++++++++++++ 8 files changed, 183 insertions(+) create mode 100644 .kokoro/release/common.cfg create mode 100644 .kokoro/release/common.sh create mode 100644 .kokoro/release/drop.cfg create mode 100755 .kokoro/release/drop.sh create mode 100644 .kokoro/release/promote.cfg create mode 100755 .kokoro/release/promote.sh create mode 100644 .kokoro/release/stage.cfg create mode 100755 .kokoro/release/stage.sh diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 000000000..48aaacebd --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100644 index 000000000..00ae4e5a3 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_PUBKEYRING=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring) + export GPG_KEYRING=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring) + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 000000000..278e44d75 --- /dev/null +++ b/.kokoro/release/drop.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 000000000..d0bdd0304 --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop --settings=settings.xml diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 000000000..e6d8b8fdf --- /dev/null +++ b/.kokoro/release/promote.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 000000000..01b0c5c05 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -DperformRelease=true --settings=settings.xml diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 000000000..c49930316 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/stage.sh" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 000000000..7e81c0351 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy \ + --settings settings.xml \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.publicKeyring=${GPG_PUBKEYRING} \ + -Dgpg.secretKeyring=${GPG_KEYRING} + + From 4c8a81b76a932f28fd5b44714a43ab673d75d852 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 21 Sep 2018 16:32:44 -0700 Subject: [PATCH 02/13] Update pom.xml files with sonatyle release process --- google-http-client-android/pom.xml | 2 +- google-http-client-gson/pom.xml | 4 +- google-http-client-jackson/pom.xml | 4 +- google-http-client-jackson2/pom.xml | 4 +- google-http-client-jdo/pom.xml | 11 +- google-http-client-test/pom.xml | 2 +- google-http-client-xml/pom.xml | 2 +- google-http-client/pom.xml | 6 +- pom.xml | 170 ++++++++++++++-------------- 9 files changed, 97 insertions(+), 108 deletions(-) diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 1fe20fca3..eaead49c1 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -16,7 +16,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ + http://download.oracle.com/javase/6/docs/api/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 429458339..6f1321a8a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -16,8 +16,8 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs + http://download.oracle.com/javase/6/docs/api/ + https://www.javadoc.io/doc/com.google.code.gson/gson/${project.gson.version} ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index 4cef10787..9d619fe87 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -16,8 +16,8 @@ maven-javadoc-plugin - https://download.oracle.com/javase/1.6.0/docs/api/ - https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/1.9.13/documentation + http://download.oracle.com/javase/6/docs/api/ + https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 041986701..0df2b4fcd 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -16,8 +16,8 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://fasterxml.github.com/jackson-core/javadoc/2.0.5/ + http://download.oracle.com/javase/6/docs/api/ + http://fasterxml.github.com/jackson-core/javadoc/${project.jackson-core2.version}/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client-jdo/pom.xml b/google-http-client-jdo/pom.xml index 596606f17..8d70eab3b 100644 --- a/google-http-client-jdo/pom.xml +++ b/google-http-client-jdo/pom.xml @@ -15,7 +15,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ + http://download.oracle.com/javase/6/docs/api/ ${project.name} ${project.version} ${project.artifactId} ${project.version} @@ -30,15 +30,6 @@ - - - jar - compile - - jar - - - maven-source-plugin diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 701e3fb07..5f4a0d842 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -16,7 +16,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ + http://download.oracle.com/javase/6/docs/api/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 9f6a6ecf4..b67fc66d2 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -16,7 +16,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ + http://download.oracle.com/javase/6/docs/api/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 8f384b1d3..351652587 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -20,9 +20,9 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://docs.guava-libraries.googlecode.com/git-history/v13.0.1/javadoc - http://commons.apache.org/proper/commons-codec/javadocs/api-release + http://download.oracle.com/javase/6/docs/api/ + https://google.github.io/guava/releases/${project.guava.version}/api/docs/ + https://commons.apache.org/proper/commons-codec/archives/${project.commons-codec.version}/apidocs/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/pom.xml b/pom.xml index 665e4d9b1..e80e83d78 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ commons-codec commons-codec - 1.6 + ${project.commons-codec.version} com.google.guava @@ -272,21 +272,20 @@ - build-helper-maven-plugin - 1.5 - - - maven-antrun-plugin - 1.6 + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.6 + true + + ossrh + https://oss.sonatype.org/ + false + maven-assembly-plugin 2.2 - - maven-clean-plugin - 2.4.1 - maven-compiler-plugin 2.3.2 @@ -295,81 +294,53 @@ 1.6 + - maven-dependency-plugin - 2.1 - - - maven-deploy-plugin - 2.5 - - - maven-ear-plugin - 2.4.2 - - - maven-ejb-plugin - 2.3 - - - maven-install-plugin - 2.3.1 - - - maven-jar-plugin - 2.3.1 - - - false - - true - - - Google - 1.6.x - - - + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + org.apache.maven.plugins maven-javadoc-plugin - 2.9 - - - maven-plugin-plugin - 2.6 - - - maven-rar-plugin - 2.2 - - - maven-release-plugin - 2.1 + 2.9.1 + + + attach-javadocs + + jar + + + - maven-resources-plugin - 2.4.3 - - - maven-site-plugin - 2.1.1 - - - maven-source-plugin - 2.1.2 + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + + test-jar + + + maven-surefire-plugin - 2.12.4 + 2.19.1 -Xmx1024m + sponge_log - - maven-war-plugin - 2.1 - maven-checkstyle-plugin 2.6 @@ -389,11 +360,6 @@ animal-sniffer-maven-plugin 1.9 - - org.sonatype.plugins - jarjar-maven-plugin - 1.9 - org.apache.maven.plugins maven-project-info-reports-plugin @@ -421,13 +387,13 @@ site - https://download.oracle.com/javase/1.6.0/docs/api/ - https://cloud.google.com/appengine/docs/java/javadoc - https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/1.9.13/documentation - http://fasterxml.github.com/jackson-core/javadoc/2.0.5/ - https://google.github.io/gson/apidocs/ - https://google.github.io/guava/releases/20.0/api/docs/ - http://commons.apache.org/proper/commons-codec/javadocs/api-release + http://download.oracle.com/javase/6/docs/api/ + http://cloud.google.com/appengine/docs/java/javadoc + https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation + http://fasterxml.github.com/jackson-core/javadoc/${project.jackson-core2.version}/ + https://www.javadoc.io/doc/com.google.code.gson/gson/${project.gson.version} + https://google.github.io/guava/releases/${project.guava.version}/api/docs/ + https://commons.apache.org/proper/commons-codec/archives/${project.commons-codec.version}/apidocs/ Google HTTP Client Library for Java ${project.version} com.google.api.client.findbugs:com.google.api.client.test.:com.google.api.services @@ -476,6 +442,7 @@ + org.apache.maven.plugins maven-checkstyle-plugin checkstyle.xml @@ -526,7 +493,7 @@ org.codehaus.mojo.signature - java15 + java16 1.0 @@ -560,6 +527,7 @@ 20.0 1.1.4c 1.1.1 + 1.10 4.5.5 2.3-eb 3.2.2 @@ -567,4 +535,34 @@ 3.2.1 4.0.3 + + + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + + From 599cd57ab8d9bc07de81eca72bf3917cc67ee2f6 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 21 Sep 2018 16:52:17 -0700 Subject: [PATCH 03/13] Set common configs --- .kokoro/release/common.cfg | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 48aaacebd..43b4689db 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -1,5 +1,18 @@ # Format: //devtools/kokoro/config/proto/build.proto +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "google-http-java-client/.kokoro/trampoline.sh" + before_action { fetch_keystore { keystore_resource { From f0f9c04da4bebca072cadb972018b876d5aa19dc Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 21 Sep 2018 16:55:29 -0700 Subject: [PATCH 04/13] Specify the trampoline image to use for release jobs --- .kokoro/release/common.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 43b4689db..4377eeb04 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -13,6 +13,12 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. build_file: "google-http-java-client/.kokoro/trampoline.sh" +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + before_action { fetch_keystore { keystore_resource { From 10e50d9f72e5ea3ff0e883279d9d836f48d7975f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 21 Sep 2018 17:00:30 -0700 Subject: [PATCH 05/13] Fix the execution directory --- .kokoro/release/drop.sh | 2 ++ .kokoro/release/promote.sh | 2 ++ .kokoro/release/stage.sh | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh index d0bdd0304..55511c64a 100755 --- a/.kokoro/release/drop.sh +++ b/.kokoro/release/drop.sh @@ -20,4 +20,6 @@ source $(dirname "$0")/common.sh setup_environment_secrets create_settings_xml_file "settings.xml" +pushd $(dirname "$0")/../../ + mvn nexus-staging:drop --settings=settings.xml diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh index 01b0c5c05..63bbf1336 100755 --- a/.kokoro/release/promote.sh +++ b/.kokoro/release/promote.sh @@ -20,4 +20,6 @@ source $(dirname "$0")/common.sh setup_environment_secrets create_settings_xml_file "settings.xml" +pushd $(dirname "$0")/../../ + mvn nexus-staging:release -DperformRelease=true --settings=settings.xml diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 7e81c0351..133f8dbc7 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -20,6 +20,8 @@ source $(dirname "$0")/common.sh setup_environment_secrets create_settings_xml_file "settings.xml" +pushd $(dirname "$0")/../../ + mvn clean install deploy \ --settings settings.xml \ -DperformRelease=true \ From f7150574f9f6431918a2271449d17d2f801b9e02 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 21 Sep 2018 17:05:01 -0700 Subject: [PATCH 06/13] Fix the execution directory --- .kokoro/release/drop.sh | 4 ++-- .kokoro/release/promote.sh | 4 ++-- .kokoro/release/stage.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh index 55511c64a..e4beedf7a 100755 --- a/.kokoro/release/drop.sh +++ b/.kokoro/release/drop.sh @@ -15,11 +15,11 @@ set -eo pipefail +pushd $(dirname "$0")/../../ + source $(dirname "$0")/common.sh setup_environment_secrets create_settings_xml_file "settings.xml" -pushd $(dirname "$0")/../../ - mvn nexus-staging:drop --settings=settings.xml diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh index 63bbf1336..13a9ac497 100755 --- a/.kokoro/release/promote.sh +++ b/.kokoro/release/promote.sh @@ -15,11 +15,11 @@ set -eo pipefail +pushd $(dirname "$0")/../../ + source $(dirname "$0")/common.sh setup_environment_secrets create_settings_xml_file "settings.xml" -pushd $(dirname "$0")/../../ - mvn nexus-staging:release -DperformRelease=true --settings=settings.xml diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 133f8dbc7..bb28c2943 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -15,13 +15,13 @@ set -eo pipefail +pushd $(dirname "$0")/../../ + source $(dirname "$0")/common.sh setup_environment_secrets create_settings_xml_file "settings.xml" -pushd $(dirname "$0")/../../ - mvn clean install deploy \ --settings settings.xml \ -DperformRelease=true \ From b09adfb27487235c2c188194acc735f64329269e Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 21 Sep 2018 17:09:29 -0700 Subject: [PATCH 07/13] Fix the execution directory --- .kokoro/release/drop.sh | 4 ++-- .kokoro/release/promote.sh | 4 ++-- .kokoro/release/stage.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh index e4beedf7a..abc381e5d 100755 --- a/.kokoro/release/drop.sh +++ b/.kokoro/release/drop.sh @@ -15,10 +15,10 @@ set -eo pipefail -pushd $(dirname "$0")/../../ - source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + setup_environment_secrets create_settings_xml_file "settings.xml" diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh index 13a9ac497..439e0fc3e 100755 --- a/.kokoro/release/promote.sh +++ b/.kokoro/release/promote.sh @@ -15,10 +15,10 @@ set -eo pipefail -pushd $(dirname "$0")/../../ - source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + setup_environment_secrets create_settings_xml_file "settings.xml" diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index bb28c2943..8234678b4 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -15,10 +15,10 @@ set -eo pipefail -pushd $(dirname "$0")/../../ - source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + setup_environment_secrets create_settings_xml_file "settings.xml" From 120de9cba6f2fc862bc2e0c0e121b740aa69abf1 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 24 Sep 2018 16:25:39 -0700 Subject: [PATCH 08/13] remove gpg for testing --- .kokoro/release/stage.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 8234678b4..143c6d516 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -24,10 +24,11 @@ create_settings_xml_file "settings.xml" mvn clean install deploy \ --settings settings.xml \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.publicKeyring=${GPG_PUBKEYRING} \ - -Dgpg.secretKeyring=${GPG_KEYRING} + -DperformRelease=true +# -DperformRelease=true \ +# -Dgpg.executable=gpg \ +# -Dgpg.passphrase=${GPG_PASSPHRASE} \ +# -Dgpg.publicKeyring=${GPG_PUBKEYRING} \ +# -Dgpg.secretKeyring=${GPG_KEYRING} From 0d6e33ecd9449ad2ddf2ad99d227dac3d32e1f43 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 24 Sep 2018 16:32:40 -0700 Subject: [PATCH 09/13] skip gpg-agent --- .kokoro/release/stage.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 143c6d516..2cd575254 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -24,11 +24,11 @@ create_settings_xml_file "settings.xml" mvn clean install deploy \ --settings settings.xml \ - -DperformRelease=true -# -DperformRelease=true \ -# -Dgpg.executable=gpg \ -# -Dgpg.passphrase=${GPG_PASSPHRASE} \ -# -Dgpg.publicKeyring=${GPG_PUBKEYRING} \ -# -Dgpg.secretKeyring=${GPG_KEYRING} + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.publicKeyring=${GPG_PUBKEYRING} \ + -Dgpg.secretKeyring=${GPG_KEYRING} \ + -Dgpg.useagent=false From 0b80ed9790e6c84804a12c133c275be92ab480e3 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 24 Sep 2018 16:41:12 -0700 Subject: [PATCH 10/13] keyring args are paths --- .kokoro/release/common.sh | 4 ++-- .kokoro/release/stage.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh index 00ae4e5a3..b77e318fe 100644 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -18,8 +18,8 @@ set -eo pipefail # Get secrets from keystore and set and environment variables setup_environment_secrets() { export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) - export GPG_PUBKEYRING=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring) - export GPG_KEYRING=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring) + export GPG_PUBKEYRING=${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring + export GPG_KEYRING=${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 2cd575254..48f07e3e1 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -29,6 +29,7 @@ mvn clean install deploy \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ -Dgpg.publicKeyring=${GPG_PUBKEYRING} \ -Dgpg.secretKeyring=${GPG_KEYRING} \ - -Dgpg.useagent=false + -Dgpg.useagent=false \ + -X From 8026e394b09857bd5c093d67b872724fa35887bb Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 25 Sep 2018 16:45:30 -0700 Subject: [PATCH 11/13] use gpg.homedir --- .kokoro/release/common.sh | 7 ++++--- .kokoro/release/stage.sh | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh index b77e318fe..cc4eb0da2 100644 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -18,11 +18,12 @@ set -eo pipefail # Get secrets from keystore and set and environment variables setup_environment_secrets() { export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) - export GPG_PUBKEYRING=${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring - export GPG_KEYRING=${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') - export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') } create_settings_xml_file() { diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 48f07e3e1..4236ade76 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -27,8 +27,7 @@ mvn clean install deploy \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.publicKeyring=${GPG_PUBKEYRING} \ - -Dgpg.secretKeyring=${GPG_KEYRING} \ + -Dgpg.homedir=${GPG_HOMEDIR} \ -Dgpg.useagent=false \ -X From fd3648ff83ffb7efbb3230fb2e060cd2fdbda7b3 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 25 Sep 2018 16:52:47 -0700 Subject: [PATCH 12/13] Fix gpg tty --- .kokoro/release/common.sh | 1 + .kokoro/release/stage.sh | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh index cc4eb0da2..f7d538b3a 100644 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -18,6 +18,7 @@ set -eo pipefail # Get secrets from keystore and set and environment variables setup_environment_secrets() { export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) export GPG_HOMEDIR=/gpg mkdir $GPG_HOMEDIR mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 4236ade76..02809c918 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -27,8 +27,6 @@ mvn clean install deploy \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} \ - -Dgpg.useagent=false \ - -X + -Dgpg.homedir=${GPG_HOMEDIR} From a4bd9c36661ab5efc6558bfa6e68d9ceeaf4b938 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 25 Sep 2018 16:58:24 -0700 Subject: [PATCH 13/13] set pinentry-mode --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index e80e83d78..e7d255ba7 100644 --- a/pom.xml +++ b/pom.xml @@ -558,6 +558,12 @@ sign + + + --pinentry-mode + loopback + +