forked from googleapis/google-http-java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kokoro release jobs (googleapis#472)
* Add Kokoro release scripts * Update pom.xml files with sonatyle release process * Set common configs * Specify the trampoline image to use for release jobs * Fix the execution directory * Fix the execution directory * Fix the execution directory * remove gpg for testing * skip gpg-agent * keyring args are paths * use gpg.homedir * Fix gpg tty * set pinentry-mode
- Loading branch information
Showing
17 changed files
with
312 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# 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" | ||
|
||
# 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 { | ||
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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/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_TTY=$(tty) | ||
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'|') | ||
} | ||
|
||
create_settings_xml_file() { | ||
echo "<settings> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${SONATYPE_USERNAME}</username> | ||
<password>${SONATYPE_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>sonatype-nexus-staging</id> | ||
<username>${SONATYPE_USERNAME}</username> | ||
<password>${SONATYPE_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>sonatype-nexus-snapshots</id> | ||
<username>${SONATYPE_USERNAME}</username> | ||
<password>${SONATYPE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings>" > $1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/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 | ||
|
||
pushd $(dirname "$0")/../../ | ||
|
||
setup_environment_secrets | ||
create_settings_xml_file "settings.xml" | ||
|
||
mvn nexus-staging:drop --settings=settings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/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 | ||
|
||
pushd $(dirname "$0")/../../ | ||
|
||
setup_environment_secrets | ||
create_settings_xml_file "settings.xml" | ||
|
||
mvn nexus-staging:release -DperformRelease=true --settings=settings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/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 | ||
|
||
pushd $(dirname "$0")/../../ | ||
|
||
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.homedir=${GPG_HOMEDIR} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.