Skip to content

Commit e66cdd9

Browse files
author
Simon Zeltser
authored
Merge branch 'master' into introduce_managedrollout
2 parents df78dfa + 6fc6f51 commit e66cdd9

File tree

120 files changed

+6552
-1250
lines changed

Some content is hidden

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

120 files changed

+6552
-1250
lines changed

.kokoro/presubmit.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
2020
value: "github/java-docs-samples/.kokoro/tests/diff_tests.sh"
2121
}
22-

.kokoro/tests/diff_tests.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,37 +38,47 @@ gcloud auth activate-service-account\
3838
--project=$GOOGLE_CLOUD_PROJECT
3939

4040
echo -e "\n******************** TESTING AFFECTED PROJECTS ********************"
41+
set +e
4142
# Diff to find out what has changed from master
43+
RESULT=0
4244
cd github/java-docs-samples
43-
find * -name pom.xml -print0 | sort -z | while read -d $'\0' file
44-
do
45+
# For every pom.xml (may break on whitespace)
46+
for file in **/pom.xml; do
4547
# Navigate to project
4648
file=$(dirname "$file")
4749
pushd "$file" > /dev/null
4850

49-
set +e
5051
# Only tests changed projects
5152
git diff --quiet master.. .
5253
CHANGED=$?
5354
# Only test leafs to prevent testing twice
5455
PARENT=$(grep "<modules>" pom.xml -c)
55-
set -e
5656

5757
# Check for changes to the current folder
5858
if [ "$CHANGED" -eq 1 ] && [ "$PARENT" -eq 0 ]; then
5959
echo "------------------------------------------------------------"
6060
echo "- testing $file"
6161
echo "------------------------------------------------------------"
6262

63+
# Run tests and update RESULT if failed
6364
mvn -q --batch-mode --fail-at-end clean verify \
6465
-Dfile.encoding="UTF-8" \
6566
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
6667
-Dmaven.test.redirectTestOutputToFile=true \
6768
-Dbigtable.projectID="${GOOGLE_CLOUD_PROJECT}" \
6869
-Dbigtable.instanceID=instance
69-
echo -e "\n Tests complete. \n"
70+
EXIT=$?
71+
72+
if [ $EXIT -ne 0 ]; then
73+
echo -e "\n Tests failed. \n"
74+
RESULT=1
75+
else
76+
echo -e "\n Tests complete. \n"
77+
fi
7078
fi
7179

7280
popd > /dev/null
7381

7482
done
83+
84+
exit $RESULT

appengine-java8/analytics/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<dependency>
8888
<groupId>org.mockito</groupId>
8989
<artifactId>mockito-core</artifactId>
90-
<version>2.15.0</version>
90+
<version>2.16.0</version>
9191
<scope>test</scope>
9292
</dependency>
9393
<dependency>

appengine-java8/bigquery/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
<dependency>
5454
<groupId>com.google.cloud</groupId>
5555
<artifactId>google-cloud-bigquery</artifactId>
56-
<version>0.37.0-beta</version>
56+
<version>1.22.0</version>
5757
</dependency>
5858
<dependency>
5959
<groupId>com.google.cloud</groupId>
6060
<artifactId>google-cloud-monitoring</artifactId>
61-
<version>0.37.0-beta</version>
61+
<version>0.40.0-beta</version>
6262
</dependency>
6363
<!-- [END dependencies ] -->
6464

@@ -96,7 +96,7 @@
9696
<dependency>
9797
<groupId>org.mockito</groupId>
9898
<artifactId>mockito-core</artifactId>
99-
<version>2.15.0</version>
99+
<version>2.16.0</version>
100100
<scope>test</scope>
101101
</dependency>
102102
<dependency>

appengine-java8/bigtable/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ limitations under the License.
4646
<dependency>
4747
<groupId>com.google.cloud.bigtable</groupId>
4848
<artifactId>bigtable-hbase-1.x</artifactId>
49-
<version>1.1.2</version>
49+
<version>1.2.0</version>
5050
</dependency>
5151

5252
<!-- Compile/runtime dependencies -->

appengine-java8/cloudsql-postgres/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<dependency>
7373
<groupId>org.postgresql</groupId>
7474
<artifactId>postgresql</artifactId>
75-
<version>42.2.1</version>
75+
<version>42.2.2</version>
7676
</dependency>
7777

7878
<dependency>

appengine-java8/datastore/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<dependency>
5454
<groupId>com.google.auto.value</groupId>
5555
<artifactId>auto-value</artifactId>
56-
<version>1.5.3</version>
56+
<version>1.5.4</version>
5757
<scope>provided</scope>
5858
</dependency>
5959

appengine-java8/guestbook-cloud-datastore/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>com.google.cloud</groupId>
6767
<artifactId>google-cloud</artifactId>
68-
<version>0.37.0-alpha</version>
68+
<version>0.40.0-alpha</version>
6969
</dependency>
7070

7171
<dependency>

appengine-java8/pubsub/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@
5252
<dependency>
5353
<groupId>com.google.cloud</groupId>
5454
<artifactId>google-cloud-pubsub</artifactId>
55-
<version>0.37.0-beta</version>
55+
<version>0.40.0-beta</version>
5656
</dependency>
5757
<dependency>
5858
<groupId>com.google.cloud</groupId>
5959
<artifactId>google-cloud-datastore</artifactId>
60-
<version>1.19.0</version>
60+
<version>1.22.0</version>
6161
</dependency>
6262
<!-- [END dependencies] -->
6363
</dependencies>

appengine-java8/spanner/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<dependency>
4545
<groupId>com.google.cloud</groupId>
4646
<artifactId>google-cloud-spanner</artifactId>
47-
<version>0.37.0-beta</version>
47+
<version>0.40.0-beta</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>javax.servlet</groupId>

appengine-java8/taskqueues-deferred/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<dependency>
6767
<groupId>org.mockito</groupId>
6868
<artifactId>mockito-core</artifactId>
69-
<version>2.15.0</version>
69+
<version>2.16.0</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>com.google.appengine</groupId>

appengine-java8/translate-pubsub/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@
4949
<dependency>
5050
<groupId>com.google.cloud</groupId>
5151
<artifactId>google-cloud-pubsub</artifactId>
52-
<version>0.37.0-beta</version>
52+
<version>0.40.0-beta</version>
5353
</dependency>
5454
<dependency>
5555
<groupId>com.google.cloud</groupId>
5656
<artifactId>google-cloud-datastore</artifactId>
57-
<version>1.19.0</version>
57+
<version>1.22.0</version>
5858
</dependency>
5959
<dependency>
6060
<groupId>com.google.cloud</groupId>
6161
<artifactId>google-cloud-translate</artifactId>
62-
<version>1.19.0</version>
62+
<version>1.22.0</version>
6363
</dependency>
6464
<!-- [END dependencies] -->
6565
</dependencies>

appengine/datastore/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@
4040
<module>indexes-exploding</module>
4141
<module>indexes-perfect</module>
4242
</modules>
43-
4443
</project>

appengine/firebase-tictactoe/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>org.mockito</groupId>
6767
<artifactId>mockito-core</artifactId>
68-
<version>2.15.0</version>
68+
<version>2.16.0</version>
6969
</dependency>
7070
<dependency>
7171
<groupId>com.google.appengine</groupId>

appengine/taskqueue/defer-samples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<dependency>
6464
<groupId>org.mockito</groupId>
6565
<artifactId>mockito-core</artifactId>
66-
<version>2.15.0</version>
66+
<version>2.16.0</version>
6767
</dependency>
6868
<dependency>
6969
<groupId>com.google.appengine</groupId>

auth/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Getting Started with Google Cloud Authentication
2+
3+
<a href="https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/java-docs-samples&page=editor&open_in_editor=auth/README.md">
4+
<img alt="Open in Cloud Shell" src ="http://gstatic.com/cloudssh/images/open-btn.png"></a>
5+
6+
See the [documentation][auth-docs] for more information about authenticating for Google Cloud APIs.
7+
8+
[auth-docs]: https://cloud.google.com/docs/authentication/production
9+
10+
## Quickstart
11+
12+
Install [Maven](http://maven.apache.org/).
13+
14+
Build your project with:
15+
16+
mvn clean package -DskipTests
17+
18+
You can then run a given `ClassName` via:
19+
20+
mvn exec:java -Dexec.mainClass=com.example.storage.ClassName \
21+
-DpropertyName=propertyValue \
22+
-Dexec.args="any arguments to the app"
23+
24+
### Listing buckets with default credentials
25+
26+
mvn exec:java -Dexec.mainClass=com.google.cloud.auth.samples.AuthExample
27+
28+
### Listing buckets with credentials in json file
29+
30+
mvn exec:java -Dexec.mainClass=com.google.cloud.auth.samples.AuthExample
31+
-Dexec.args="explicit [path-to-credentials-json]"
32+
33+
### Listing buckets while running on a Google Compute Engine instance
34+
35+
mvn exec:java -Dexec.mainClass=com.google.cloud.auth.samples.AuthExample
36+
-Dexec.args="compute"

auth/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!--
2+
Copyright 2016 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+
<project>
17+
<modelVersion>4.0.0</modelVersion>
18+
<groupId>com.example.cloud.auth.samples</groupId>
19+
<artifactId>auth</artifactId>
20+
<version>1.0</version>
21+
<name>auth</name>
22+
<url>http://maven.apache.org</url>
23+
24+
<!--
25+
The parent pom defines common style checks and testing strategies for our samples.
26+
Removing or replacing it should not affect the execution of the samples in anyway.
27+
-->
28+
<parent>
29+
<groupId>com.google.cloud.samples</groupId>
30+
<artifactId>shared-configuration</artifactId>
31+
<version>1.0.8</version>
32+
</parent>
33+
34+
<properties>
35+
<maven.compiler.target>1.8</maven.compiler.target>
36+
<maven.compiler.source>1.8</maven.compiler.source>
37+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38+
</properties>
39+
40+
<dependencies>
41+
<!-- START dependencies -->
42+
<dependency>
43+
<groupId>com.google.cloud</groupId>
44+
<artifactId>google-cloud-storage</artifactId>
45+
<version>1.14.0</version>
46+
</dependency>
47+
<!-- END dependencies -->
48+
<dependency>
49+
<groupId>commons-io</groupId>
50+
<artifactId>commons-io</artifactId>
51+
<version>1.4</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>junit</groupId>
55+
<artifactId>junit</artifactId>
56+
<version>4.12</version>
57+
<scope>test</scope>
58+
</dependency>
59+
</dependencies>
60+
</project>

0 commit comments

Comments
 (0)