This repository was archived by the owner on May 8, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
feat: set up repo for samples #196
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b991726
docs: update libraries-bom
anguillanneuf 576b004
Merge branch 'anguillanneuf-patch-1'
anguillanneuf 5119851
Merge branch 'master' of github.com:googleapis/java-pubsub
anguillanneuf f1584bb
Merge branch 'master' of github.com:googleapis/java-pubsub
anguillanneuf 6970a17
Merge branch 'master' of github.com:googleapis/java-pubsub
anguillanneuf f1bc320
Merge branch 'master' of github.com:googleapis/java-pubsub
anguillanneuf 27f0e54
Merge branch 'master' of github.com:googleapis/java-pubsub
anguillanneuf 8fc8080
set up samples testing
anguillanneuf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,30 @@ | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # 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. | ||
|
|
||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Download secrets from Cloud Storage. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/java11" | ||
| } | ||
|
|
||
| # Tell trampoline which tests to run. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/java-pubsub/.kokoro/run_samples_tests.sh" | ||
| } |
This file contains hidden or 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,31 @@ | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # 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. | ||
|
|
||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Download secrets from Cloud Storage. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/java8" | ||
| } | ||
|
|
||
| # Tell trampoline which tests to run. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/java-pubsub/.kokoro/run_samples_tests.sh" | ||
| } | ||
| © 2020 GitHub, Inc. | ||
This file contains hidden or 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,30 @@ | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # 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. | ||
|
|
||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Download secrets from Cloud Storage. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/java11" | ||
| } | ||
|
|
||
| # Tell trampoline which tests to run. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/java-pubsub/.kokoro/run_samples_tests.sh" | ||
| } |
This file contains hidden or 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,31 @@ | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # 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. | ||
|
|
||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Download secrets from Cloud Storage. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/java8" | ||
| } | ||
|
|
||
| # Tell trampoline which tests to run. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/java-pubsub/.kokoro/run_samples_tests.sh" | ||
| } | ||
| © 2020 GitHub, Inc. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo? |
||
This file contains hidden or 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,30 @@ | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # 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. | ||
|
|
||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Download secrets from Cloud Storage. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/java11" | ||
| } | ||
|
|
||
| # Tell trampoline which tests to run. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/java-pubsub/.kokoro/run_samples_tests.sh" | ||
| } |
This file contains hidden or 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,31 @@ | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # 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. | ||
|
|
||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Download secrets from Cloud Storage. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/java8" | ||
| } | ||
|
|
||
| # Tell trampoline which tests to run. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/java-pubsub/.kokoro/run_samples_tests.sh" | ||
| } | ||
| © 2020 GitHub, Inc. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a typo
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh no, I need to take it out.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please review #201 |
||
This file contains hidden or 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,51 @@ | ||
| #!/bin/bash | ||
| # Copyright 2020 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. | ||
|
|
||
| # `-e` enables the script to automatically fail when a command fails | ||
| # `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero | ||
| set -eo pipefail | ||
|
|
||
| echo "********** MAVEN INFO ***********" | ||
| mvn -v | ||
|
|
||
| # Get the directory of the build script | ||
| scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) | ||
| ## cd to the parent directory, i.e. the root of the git repo | ||
| cd ${scriptDir}/.. | ||
|
|
||
| # include common functions | ||
| source ${scriptDir}/common.sh | ||
|
|
||
| # Attempt to install 3 times with exponential backoff (starting with 10 seconds) | ||
| retry_with_backoff 3 10 \ | ||
| mvn install -B -V \ | ||
| -DskipTests=true \ | ||
| -Dclirr.skip=true \ | ||
| -Denforcer.skip=true \ | ||
| -Dmaven.javadoc.skip=true \ | ||
| -Dgcloud.download.skip=true \ | ||
| -T 1C | ||
|
|
||
| # Activate service account | ||
| gcloud auth activate-service-account \ | ||
| --key-file="$GOOGLE_APPLICATION_CREDENTIALS" \ | ||
| --project="$GOOGLE_CLOUD_PROJECT" | ||
|
|
||
| # Move into the samples directory | ||
| cd samples/ | ||
|
|
||
| echo -e "\n******************** RUNNING SAMPLE TESTS ********************" | ||
|
|
||
| mvn --fail-at-end clean verify |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?