Skip to content

Commit 0affe4d

Browse files
authored
Merge branch 'master' into autosynth-dlp
2 parents 943caa8 + 77e971a commit 0affe4d

File tree

247 files changed

+10313
-1777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+10313
-1777
lines changed

.kokoro/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ fi
3131
case $JOB_TYPE in
3232
test)
3333
mvn test -B
34+
bash $KOKORO_GFILE_DIR/codecov.sh
3435
;;
3536
javadoc)
3637
mvn javadoc:javadoc javadoc:test-javadoc

.kokoro/continuous/common.cfg

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ before_action {
2828
keystore_resource {
2929
keystore_config_id: 73713
3030
keyname: "java_it_service_account"
31-
# TODO(chingor): remove this after secrets have globally propagated
32-
backend_type: FASTCONFIGPUSH
3331
}
3432
}
3533
}
@@ -39,8 +37,16 @@ before_action {
3937
keystore_resource {
4038
keystore_config_id: 73713
4139
keyname: "java_firestore_it_service_account"
42-
# TODO(chingor): remove this after secrets have globally propagated
43-
backend_type: FASTCONFIGPUSH
40+
}
41+
}
42+
}
43+
44+
# Request the codecov master token
45+
before_action {
46+
fetch_keystore {
47+
keystore_resource {
48+
keystore_config_id: 73713
49+
keyname: "dpebot_codecov_token"
4450
}
4551
}
4652
}

.kokoro/presubmit/common.cfg

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ before_action {
2828
keystore_resource {
2929
keystore_config_id: 73713
3030
keyname: "java_it_service_account"
31-
# TODO(chingor): remove this after secrets have globally propagated
32-
backend_type: FASTCONFIGPUSH
3331
}
3432
}
3533
}
@@ -39,8 +37,17 @@ before_action {
3937
keystore_resource {
4038
keystore_config_id: 73713
4139
keyname: "java_firestore_it_service_account"
42-
# TODO(chingor): remove this after secrets have globally propagated
43-
backend_type: FASTCONFIGPUSH
4440
}
4541
}
4642
}
43+
44+
# Request the codecov master token
45+
before_action {
46+
fetch_keystore {
47+
keystore_resource {
48+
keystore_config_id: 73713
49+
keyname: "dpebot_codecov_token"
50+
}
51+
}
52+
}
53+

.kokoro/release/common.cfg

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Download trampoline resources.
4+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
5+
6+
# Use the trampoline script to run in docker.
7+
build_file: "google-cloud-java/.kokoro/trampoline.sh"
8+
9+
# Configure the docker image for kokoro-trampoline.
10+
env_vars: {
11+
key: "TRAMPOLINE_IMAGE"
12+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
13+
}
14+
15+
before_action {
16+
fetch_keystore {
17+
keystore_resource {
18+
keystore_config_id: 70247
19+
keyname: "maven-gpg-keyring"
20+
}
21+
}
22+
}
23+
24+
before_action {
25+
fetch_keystore {
26+
keystore_resource {
27+
keystore_config_id: 70247
28+
keyname: "maven-gpg-passphrase"
29+
}
30+
}
31+
}
32+
33+
before_action {
34+
fetch_keystore {
35+
keystore_resource {
36+
keystore_config_id: 70247
37+
keyname: "maven-gpg-pubkeyring"
38+
}
39+
}
40+
}
41+
42+
before_action {
43+
fetch_keystore {
44+
keystore_resource {
45+
keystore_config_id: 70247
46+
keyname: "sonatype-credentials"
47+
}
48+
}
49+
}

.kokoro/release/common.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
# Copyright 2018 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
# Get secrets from keystore and set and environment variables
19+
setup_environment_secrets() {
20+
export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase)
21+
export GPG_TTY=$(tty)
22+
export GPG_HOMEDIR=/gpg
23+
mkdir $GPG_HOMEDIR
24+
mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg
25+
mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg
26+
export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|')
27+
export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|')
28+
}
29+
30+
create_settings_xml_file() {
31+
echo "<settings>
32+
<servers>
33+
<server>
34+
<id>ossrh</id>
35+
<username>${SONATYPE_USERNAME}</username>
36+
<password>${SONATYPE_PASSWORD}</password>
37+
</server>
38+
<server>
39+
<id>sonatype-nexus-staging</id>
40+
<username>${SONATYPE_USERNAME}</username>
41+
<password>${SONATYPE_PASSWORD}</password>
42+
</server>
43+
<server>
44+
<id>sonatype-nexus-snapshots</id>
45+
<username>${SONATYPE_USERNAME}</username>
46+
<password>${SONATYPE_PASSWORD}</password>
47+
</server>
48+
</servers>
49+
</settings>" > $1
50+
}

.kokoro/release/drop.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
env_vars: {
3+
key: "TRAMPOLINE_BUILD_FILE"
4+
value: "github/google-cloud-java/.kokoro/release/drop.sh"
5+
}
6+
# Download staging properties file.
7+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/google-auth-library"

.kokoro/release/drop.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
# Copyright 2018 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
source $(dirname "$0")/common.sh
19+
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../)/settings.xml
20+
pushd $(dirname "$0")/../
21+
22+
setup_environment_secrets
23+
create_settings_xml_file "settings.xml"
24+
25+
mvn nexus-staging:drop -P release

.kokoro/release/promote.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
env_vars: {
3+
key: "TRAMPOLINE_BUILD_FILE"
4+
value: "github/google-cloud-java/.kokoro/release/promote.sh"
5+
}
6+
# Download staging properties file.
7+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/google-auth-library"

.kokoro/release/promote.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
# Copyright 2018 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
source $(dirname "$0")/common.sh
19+
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../)/settings.xml
20+
pushd $(dirname "$0")/../
21+
22+
setup_environment_secrets
23+
create_settings_xml_file "settings.xml"
24+
25+
mvn nexus-staging:release -P release

.kokoro/release/stage.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
env_vars: {
3+
key: "TRAMPOLINE_BUILD_FILE"
4+
value: "github/google-cloud-java/.kokoro/release/stage.sh"
5+
}
6+
# Need to save the properties file
7+
action {
8+
define_artifacts {
9+
regex: "github/google-cloud-java/target/nexus-staging/staging/*.properties"
10+
strip_prefix: "github/google-cloud-java"
11+
}
12+
}

0 commit comments

Comments
 (0)