Skip to content

Commit

Permalink
chore: update common templates (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Mar 18, 2020
1 parent 92f2755 commit 1c78d84
Show file tree
Hide file tree
Showing 12 changed files with 286 additions and 173 deletions.
51 changes: 40 additions & 11 deletions .kokoro/build.sh
Expand Up @@ -37,19 +37,23 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
fi

RETURN_CODE=0
set +e

case ${JOB_TYPE} in
test)
mvn test -B -Dclirr.skip=true -Denforcer.skip=true
bash ${KOKORO_GFILE_DIR}/codecov.sh
bash .kokoro/coerce_logs.sh
RETURN_CODE=$?
;;
lint)
mvn \
-Penable-samples \
com.coveo:fmt-maven-plugin:check
RETURN_CODE=$?
;;
javadoc)
mvn javadoc:javadoc javadoc:test-javadoc
RETURN_CODE=$?
;;
integration)
mvn -B ${INTEGRATION_TEST_ARGS} \
Expand All @@ -59,21 +63,46 @@ integration)
-Denforcer.skip=true \
-fae \
verify
bash .kokoro/coerce_logs.sh
RETURN_CODE=$?
;;
samples)
mvn -B \
-Penable-samples \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-fae \
verify
bash .kokoro/coerce_logs.sh
if [[ -f samples/pom.xml ]]
then
pushd samples
mvn -B \
-Penable-samples \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-fae \
verify
RETURN_CODE=$?
popd
else
echo "no sample pom.xml found - skipping sample tests"
fi
;;
clirr)
mvn -B -Denforcer.skip=true clirr:check
RETURN_CODE=$?
;;
*)
;;
esac

if [ "${REPORT_COVERAGE}" == "true" ]
then
bash ${KOKORO_GFILE_DIR}/codecov.sh
fi

# fix output location of logs
bash .kokoro/coerce_logs.sh

if [[ "${ENABLE_BUILD_COP}" == "true" ]]
then
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop
${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-bigtable
fi

echo "exiting with ${RETURN_CODE}"
exit ${RETURN_CODE}
5 changes: 5 additions & 0 deletions .kokoro/continuous/java8.cfg
Expand Up @@ -5,3 +5,8 @@ env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "REPORT_COVERAGE"
value: "true"
}
14 changes: 14 additions & 0 deletions .kokoro/nightly/integration.cfg
Expand Up @@ -5,3 +5,17 @@ env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
}
}
}
5 changes: 5 additions & 0 deletions .kokoro/nightly/java8.cfg
Expand Up @@ -5,3 +5,8 @@ env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "REPORT_COVERAGE"
value: "true"
}
21 changes: 13 additions & 8 deletions .kokoro/nightly/samples.cfg
Expand Up @@ -2,23 +2,28 @@

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "samples"
key: "JOB_TYPE"
value: "samples"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}

env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
}

before_action {
Expand Down
5 changes: 5 additions & 0 deletions .kokoro/presubmit/java8.cfg
Expand Up @@ -5,3 +5,8 @@ env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "REPORT_COVERAGE"
value: "true"
}

Large diffs are not rendered by default.

Expand Up @@ -165,7 +165,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* `projects/{project}/instances/{instance}/tables/{table}`.
* </pre>
*
* <code>string name = 1;</code>
* <code>
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The name.
*/
Expand All @@ -189,7 +191,9 @@ public java.lang.String getName() {
* `projects/{project}/instances/{instance}/tables/{table}`.
* </pre>
*
* <code>string name = 1;</code>
* <code>
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The bytes for name.
*/
Expand All @@ -216,7 +220,9 @@ public com.google.protobuf.ByteString getNameBytes() {
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* </pre>
*
* <code>string cluster = 2;</code>
* <code>
* string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The cluster.
*/
Expand All @@ -240,7 +246,9 @@ public java.lang.String getCluster() {
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* </pre>
*
* <code>string cluster = 2;</code>
* <code>
* string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The bytes for cluster.
*/
Expand Down Expand Up @@ -268,7 +276,7 @@ public com.google.protobuf.ByteString getClusterBytes() {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
* </pre>
*
* <code>string snapshot_id = 3;</code>
* <code>string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The snapshotId.
*/
Expand All @@ -293,7 +301,7 @@ public java.lang.String getSnapshotId() {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
* </pre>
*
* <code>string snapshot_id = 3;</code>
* <code>string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for snapshotId.
*/
Expand Down Expand Up @@ -817,7 +825,9 @@ public Builder mergeFrom(
* `projects/{project}/instances/{instance}/tables/{table}`.
* </pre>
*
* <code>string name = 1;</code>
* <code>
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The name.
*/
Expand All @@ -841,7 +851,9 @@ public java.lang.String getName() {
* `projects/{project}/instances/{instance}/tables/{table}`.
* </pre>
*
* <code>string name = 1;</code>
* <code>
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The bytes for name.
*/
Expand All @@ -865,7 +877,9 @@ public com.google.protobuf.ByteString getNameBytes() {
* `projects/{project}/instances/{instance}/tables/{table}`.
* </pre>
*
* <code>string name = 1;</code>
* <code>
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @param value The name to set.
* @return This builder for chaining.
Expand All @@ -888,7 +902,9 @@ public Builder setName(java.lang.String value) {
* `projects/{project}/instances/{instance}/tables/{table}`.
* </pre>
*
* <code>string name = 1;</code>
* <code>
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return This builder for chaining.
*/
Expand All @@ -907,7 +923,9 @@ public Builder clearName() {
* `projects/{project}/instances/{instance}/tables/{table}`.
* </pre>
*
* <code>string name = 1;</code>
* <code>
* string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @param value The bytes for name to set.
* @return This builder for chaining.
Expand All @@ -933,7 +951,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* </pre>
*
* <code>string cluster = 2;</code>
* <code>
* string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The cluster.
*/
Expand All @@ -957,7 +977,9 @@ public java.lang.String getCluster() {
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* </pre>
*
* <code>string cluster = 2;</code>
* <code>
* string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The bytes for cluster.
*/
Expand All @@ -981,7 +1003,9 @@ public com.google.protobuf.ByteString getClusterBytes() {
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* </pre>
*
* <code>string cluster = 2;</code>
* <code>
* string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @param value The cluster to set.
* @return This builder for chaining.
Expand All @@ -1004,7 +1028,9 @@ public Builder setCluster(java.lang.String value) {
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* </pre>
*
* <code>string cluster = 2;</code>
* <code>
* string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return This builder for chaining.
*/
Expand All @@ -1023,7 +1049,9 @@ public Builder clearCluster() {
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* </pre>
*
* <code>string cluster = 2;</code>
* <code>
* string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @param value The bytes for cluster to set.
* @return This builder for chaining.
Expand All @@ -1050,7 +1078,7 @@ public Builder setClusterBytes(com.google.protobuf.ByteString value) {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
* </pre>
*
* <code>string snapshot_id = 3;</code>
* <code>string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The snapshotId.
*/
Expand All @@ -1075,7 +1103,7 @@ public java.lang.String getSnapshotId() {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
* </pre>
*
* <code>string snapshot_id = 3;</code>
* <code>string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for snapshotId.
*/
Expand All @@ -1100,7 +1128,7 @@ public com.google.protobuf.ByteString getSnapshotIdBytes() {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
* </pre>
*
* <code>string snapshot_id = 3;</code>
* <code>string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @param value The snapshotId to set.
* @return This builder for chaining.
Expand All @@ -1124,7 +1152,7 @@ public Builder setSnapshotId(java.lang.String value) {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
* </pre>
*
* <code>string snapshot_id = 3;</code>
* <code>string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return This builder for chaining.
*/
Expand All @@ -1144,7 +1172,7 @@ public Builder clearSnapshotId() {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
* </pre>
*
* <code>string snapshot_id = 3;</code>
* <code>string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @param value The bytes for snapshotId to set.
* @return This builder for chaining.
Expand Down

0 comments on commit 1c78d84

Please sign in to comment.