Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
chore: update common templates (#24)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/a8b4de14-bbed-43a8-a032-34b2812821a8/targets
  • Loading branch information
yoshi-automation committed May 5, 2020
1 parent 38a8d65 commit 806ef7b
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 19 deletions.
19 changes: 17 additions & 2 deletions .kokoro/common.sh
Expand Up @@ -13,18 +13,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# set -eo pipefail

function retry_with_backoff {
attempts_left=$1
sleep_seconds=$2
shift 2
command=$@


# store current flag state
flags=$-

# allow a failures to continue
set +e
echo "${command}"
${command}
exit_code=$?

# restore "e" flag
if [[ ${flags} =~ e ]]
then set -e
else set +e
fi

if [[ $exit_code == 0 ]]
then
return 0
Expand All @@ -42,3 +52,8 @@ function retry_with_backoff {

return $exit_code
}

## Helper functionss
function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; }
function msg() { println "$*" >&2; }
function println() { printf '%s\n' "$(now) $*"; }
48 changes: 48 additions & 0 deletions .kokoro/dependencies.sh
Expand Up @@ -36,3 +36,51 @@ retry_with_backoff 3 10 \
-Dclirr.skip=true

mvn -B dependency:analyze -DfailOnWarning=true

echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
## Run dependency list completeness check
function completenessCheck() {
# Output dep list with compile scope generated using the original pom
msg "Generating dependency list using original pom..."
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt

# Output dep list generated using the flattened pom (test scope deps are ommitted)
msg "Generating dependency list using flattened pom..."
mvn dependency:list -f .flattened-pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt

# Compare two dependency lists
msg "Comparing dependency lists..."
diff .org-list.txt .new-list.txt >.diff.txt
if [[ $? == 0 ]]
then
msg "Success. No diff!"
else
msg "Diff found. See below: "
msg "You can also check .diff.txt file located in $1."
cat .diff.txt
return 1
fi
}

# Allow failures to continue running the script
set +e

error_count=0
for path in $(find -name ".flattened-pom.xml")
do
# Check flattened pom in each dir that contains it for completeness
dir=$(dirname "$path")
pushd "$dir"
completenessCheck "$dir"
error_count=$(($error_count + $?))
popd
done

if [[ $error_count == 0 ]]
then
msg "All checks passed."
exit 0
else
msg "Errors found. See log statements above."
exit 1
fi
20 changes: 20 additions & 0 deletions .kokoro/nightly/integration.cfg
Expand Up @@ -6,11 +6,31 @@ env_vars: {
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}
# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

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

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

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

before_action {
fetch_keystore {
keystore_resource {
Expand Down
8 changes: 7 additions & 1 deletion .kokoro/nightly/samples.cfg
Expand Up @@ -11,9 +11,15 @@ env_vars: {
value: "samples"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
value: "java-docs-samples-testing"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "java-docs-samples-testing"
}

env_vars: {
Expand Down
14 changes: 10 additions & 4 deletions .kokoro/presubmit/integration.cfg
Expand Up @@ -11,14 +11,20 @@ env_vars: {
value: "integration"
}

# TODO: remove this after we've migrated all tests and scripts
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_CLOUD_PROJECT"
value: "gcloud-devel"
}

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

before_action {
Expand Down
14 changes: 10 additions & 4 deletions .kokoro/presubmit/samples.cfg
Expand Up @@ -11,14 +11,20 @@ env_vars: {
value: "samples"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
key: "GCLOUD_PROJECT"
value: "java-docs-samples-testing"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
key: "GOOGLE_CLOUD_PROJECT"
value: "java-docs-samples-testing"
}

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

before_action {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>4.4.0</version>
<version>5.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -34,8 +34,6 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
</dependencies>
```

[//]: # ({x-version-update-start:google-cloud-os-config:released})

If you are using Maven without BOM, add this to your dependencies:

```xml
Expand All @@ -46,6 +44,8 @@ If you are using Maven without BOM, add this to your dependencies:
</dependency>
```

[//]: # ({x-version-update-start:google-cloud-os-config:released})

If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-os-config:0.0.0'
Expand Down
14 changes: 9 additions & 5 deletions synth.metadata
@@ -1,21 +1,25 @@
{
"updateTime": "2020-04-03T21:52:53.059389Z",
"sources": [
{
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-os-config.git",
"sha": "45e54336acce8e430b9a28dd0a3247f10d816ce5"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "23848c8f64a5e81a239d6133378468185f1756dc",
"internalRef": "304696192",
"log": "23848c8f64a5e81a239d6133378468185f1756dc\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696192\n\n9514fa9e390a4c0715972c5b510cf4c10ad049a1\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304695334\n\n0f7b1509a9a452808c3d07fe90fedfcea763d7d5\nfix: change config_schema_version to 2.0.0 for containeranalysis v1 gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304672648\n\n3d52f3c126fbfc31f067a7f54737b7f0dfbce163\nDialogflow weekly v2 library update:\n- Change `parent` field's resource_reference to specify child_type instead of type per client library generation requirement;\n- Change Session with its child resource pattern to support both projects/{project}/agent/sessions/{session} and projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session};\n- Fix `method_signature`\n- Regular documentation update\n\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 304635286\n\n4a6a01ce0ead505c245d11a2ce156de34800c58f\ndocs: change a relative URL to an absolute URL to fix broken links.\n\nPiperOrigin-RevId: 304633630\n\n1b969c28a6579265e89cd35e6c2ecacc89970e2d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304620317\n\n5378173a889f9c7d83e36e52d38a6267190de692\nAdd v1beta2 SubmitJobAsOperation RPC to Dataproc.\n\nPiperOrigin-RevId: 304594381\n\n3d5d228a58bdf875e6147b228db3159010c735ee\nEnable visibility on the GetSnapshot and GetTopicSnapshots methods\n\nPiperOrigin-RevId: 304500143\n\n1346f5c11a0376bc82c5c03259b304de52671518\nRefresh public client library for Cloud Monitoring.\nIncrease default ListTimeSeries deadline to 90s.\n\nPiperOrigin-RevId: 304467075\n\n4a6cfccb4a32cb28db7366295d90078c6af3112f\ndocs: Fix link in monitoring summary description.\n\nPiperOrigin-RevId: 304438717\n\n6e2ea9a4b63a264090f1bd4b5b25766a3f634f3a\nfix: add interface name overrides back to logging gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304438432\n\n01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0\nFix: Add package/namespace options for C#, Ruby and PHP in remaining protos.\n\nPiperOrigin-RevId: 304416658\n\nb89abbf12cd3c086abddcd79adb0a653349f960a\nchore(google/maps): Rename nox.py to noxfile.py\n\nupstream wip fix here: https://github.com/googleapis/gapic-generator/pull/3156\n\nPiperOrigin-RevId: 304411146\n\nbbf26d7f11fae7789b13959bf100983c496c9807\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 304409906\n\n75047719f704d61f405cac6d7439637ab36c1232\nfix Dataproc: add missing `REQUIRED` annotation.\n\nPiperOrigin-RevId: 304305096\n\n7e1b880fd5d477176cf9b0bb9b137b9bea56e787\nAdd Ruby/PHP namespace options\n\nPiperOrigin-RevId: 304288402\n\naba342359b6743353195ca53f944fe71e6fb6cd4\nchore: add java assembly target for accesscontextmanager BUILD.bazel\n\nPiperOrigin-RevId: 304207684\n\ndc65f39f33cb139b3a2244199a3e722a4d94b679\nFor Secret Manager v1 and v1beta1, noted Secret ID character limitations.\n\nPiperOrigin-RevId: 304035052\n\n2ee8c4d06db823c29a127709e66c35e38b6e98ab\nchore(deps): Update gax-java dependency\nThis is to integrate java11 incompatibility fix\n\nPiperOrigin-RevId: 304032057\n\nb5c94cec71ea9b840dc0110a0275323313ecc85a\nchore: add java assembly target for orgpolicy BUILD.bazel\n\nPiperOrigin-RevId: 304021854\n\n690f4d6344197fde775230cec165a9db3b3929c7\nchore: use the latest protoc-java-resource-name-plugin in third_party/googleapis WORKSPACE.\n- trace up only one level when calculating parent types with singleton resource names\n\nPiperOrigin-RevId: 304007414\n\n87144228bd9920b824996355f27891310fad5a32\nEnable gapic v2 for DLP.\n\nCommitter: @hzyi-google\nPiperOrigin-RevId: 303999064\n\n17cfae00f2bb51cb1683f017da7e295a1b0f01a8\nAdd a new AuthorizationType for Data Source Definition.\n\nPiperOrigin-RevId: 303992863\n\n6da3d64919c006ef40cad2026f1e39084253afe2\nfix(google/maps): Change importpath to developers.google.com/maps/go.\n\nPiperOrigin-RevId: 303976942\n\n2983dccde54f0ce31793e1e628379616c468aea0\nbuild(google/maps): only modify root build.gradle with ext plugin\n\nPiperOrigin-RevId: 303975876\n\n00f0a285f2716ce57e98afe500e450b17b556ff8\nfix: Integerate gapic-generator java_gapic rules Java11 fix\n\nPiperOrigin-RevId: 303899179\n\na62857d26bd2ae15aec13a9244989e4104195b63\nfix: add proto_package to the artman config of dataproc v1beta2 to make artman smoketest pass.\n\nPiperOrigin-RevId: 303853989\n\nf260ba248df934fd4ddc22950fb529a59d79e0b5\nchore: use the latest gapic-generator in googleapis WORKSPACE.\n- PHP multi-pattern resource name support.\n- Trace up only one level when calculating parent types with singleton resource names\n\nPiperOrigin-RevId: 303836059\n\n89c7d455fffa5d8a7e73c2f4da43a74605ed72a6\nfeat: Add client library options to OsConfigService v1 patch APIs.\n\nPiperOrigin-RevId: 303831150\n\na45b0a2a8f6f497547ab531a4da978c76441d076\ndataproc: add back non-default retry parameters.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303830177\n\nad895ce95f1f6d2261fbbc3e8897958294e4f017\nenable gapic v2 for containeranalysis.\ncommitter: @hzyi-google\n\nPiperOrigin-RevId: 303821111\n\nbaf83e521834b67397839bcbe2d7864b49e38787\nAdding \"resource_reference\" annotations to services.\n\nPiperOrigin-RevId: 303791704\n\n7be2811ad17013a5ea24cd75dfd9e399dd6e18fe\nfix: Update gapic-generator version to pickup discogapic fixes\n\nPiperOrigin-RevId: 303545940\n\nb655808b3481a92f478ae2f828a6ce8220e40f32\ncloudasset: add org policy and access context manager protos to client libraries.\n\nPiperOrigin-RevId: 303527638\n\nd8c5da9a9471659b51d5862dd2ea7ad3c4bc49ef\nPopulate BAZEL.build files for AccessContextManager.\n\nPiperOrigin-RevId: 303526825\n\ncf9db7161cb9d4dbef06cd8bf5354ec485e51e2d\nPopulate BAZEL.build files for OrgPolicy.\n\nPiperOrigin-RevId: 303526702\n\n558b800ed594acc02555cc560fbb39c0e42bc438\nchore: turn on gapic v2 for Dataproc API.\nfix:\n- add missing method signatures\n- remove resource_reference not on a string field\n- adjust resource name pattern orders\n\nPiperOrigin-RevId: 303431167\n\n8eb444cf5ff63f68d826acbb37b2ac3da58655fb\nAdd logging protos for Recommender v1beta1.\n\nPiperOrigin-RevId: 303426030\n\n48a166ce9f6e2a88b10947341b37336fe9dd3478\nPush of PHP, C# and Ruby namespaces\n\nPiperOrigin-RevId: 303302813\n\n42f77489b300df2e27c84a7b65c4e8f04da20981\nThis is first release of the API protos and Bazel BUILD files for the Analytics Management API V1alpha.\n\nPiperOrigin-RevId: 303241805\n\n"
"internalRef": "304696192"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "99820243d348191bc9c634f2b48ddf65096285ed",
"log": "99820243d348191bc9c634f2b48ddf65096285ed\nfix: update template files for Node.js libraries (#463)\n\n\n3cbe6bcd5623139ac9834c43818424ddca5430cb\nfix(ruby): remove dead troubleshooting link from generated auth guide (#462)\n\n\na003d8655d3ebec2bbbd5fc3898e91e152265c67\ndocs: remove \"install stable\" instructions (#461)\n\nThe package hasn't been released to PyPI in some time\nf5e8c88d9870d8aa4eb43fa0b39f07e02bfbe4df\nchore(python): add license headers to config files; make small tweaks to templates (#458)\n\n\n"
"sha": "52638600f387deb98efb5f9c85fec39e82aa9052"
}
}
],
Expand Down

0 comments on commit 806ef7b

Please sign in to comment.