Skip to content

Commit b39b353

Browse files
authored
cleanup: move google/cloud/examples/ to examples/ (#9304)
We decided to separate the libraries from the examples that use more than one library.
1 parent 40b66c4 commit b39b353

19 files changed

+10
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ if (GOOGLE_CLOUD_CPP_ENABLE_EXAMPLES
362362
AND iam IN_LIST GOOGLE_CLOUD_CPP_ENABLE
363363
AND spanner IN_LIST GOOGLE_CLOUD_CPP_ENABLE
364364
AND storage IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
365-
add_subdirectory(google/cloud/examples)
365+
add_subdirectory(examples)
366366
endif ()
367367

368368
# Obsolete / retired flags and options. Removing them just cleans up a bit of

ci/cloudbuild/builds/coverage.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ export CXX=g++
2626
# Explicitly list the patterns that match hand-crafted code. Excluding the
2727
# generated code results in a longer list and more maintenance.
2828
instrumented_patterns=(
29+
"/examples[/:]"
30+
"/generator[/:]"
2931
"/google/cloud:"
3032
"/google/cloud/testing_util:"
3133
"/google/cloud/bigtable[/:]"
32-
"/google/cloud/examples[/:]"
3334
"/google/cloud/pubsub[/:]"
3435
"/google/cloud/pubsublite[/:]"
3536
"/google/cloud/spanner[/:]"
3637
"/google/cloud/storage[/:]"
37-
"/generator[/:]"
3838
)
3939
instrumentation_filter="$(printf ",%s" "${instrumented_patterns[@]}")"
4040
instrumentation_filter="${instrumentation_filter:1}"

ci/cloudbuild/builds/integration-production.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ mapfile -t args < <(bazel::common_args)
2929
bazel test "${args[@]}" --test_tag_filters=-integration-test ...
3030

3131
excluded_rules=(
32+
"-//examples:grpc_credential_types"
3233
"-//google/cloud/bigtable/examples:bigtable_grpc_credentials"
3334
"-//google/cloud/storage/examples:storage_service_account_samples"
3435
"-//google/cloud/storage/tests:service_account_integration_test"
35-
"-//google/cloud/examples:grpc_credential_types"
3636
"-//google/cloud/storage/tests:grpc_integration_test"
3737
)
3838

ci/cloudbuild/builds/lib/integration.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function integration::bazel_with_emulators() {
216216
"--test_env=GOOGLE_CLOUD_CPP_TEST_HELLO_WORLD_HTTP_URL=${hello_world_http}" \
217217
"--test_env=GOOGLE_CLOUD_CPP_TEST_HELLO_WORLD_GRPC_URL=${hello_world_grpc}" \
218218
"--test_env=GOOGLE_CLOUD_CPP_TEST_HELLO_WORLD_SERVICE_ACCOUNT=${GOOGLE_CLOUD_CPP_TEST_HELLO_WORLD_SERVICE_ACCOUNT}" \
219-
//google/cloud/examples/...
219+
//examples/...
220220

221221
local bazel_output_base
222222
if echo "${args[@]}" | grep -w -q -- "--config=msan"; then

cmake/GoogleCloudCppCommon.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ elseif (GOOGLE_CLOUD_CPP_GENERATE_DOXYGEN)
6868
# found here
6969
"${PROJECT_BINARY_DIR}/external/googleapis"
7070
# Proto files generated by the examples are found here
71-
"${PROJECT_BINARY_DIR}/google/cloud/examples"
71+
"${PROJECT_BINARY_DIR}/examples"
7272
# Any additional includes that the library needs
7373
${GOOGLE_CLOUD_CPP_DOXYGEN_EXTRA_INCLUDES})
7474
set(DOXYGEN_GENERATE_LATEX NO)

google/cloud/examples/BUILD.bazel renamed to examples/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ cc_test(
8181
timeout = "long",
8282
srcs = ["grpc_credential_types.cc"],
8383
copts = [
84-
"-I$(GENDIR)/google/cloud/examples",
84+
"-I$(GENDIR)/examples",
8585
],
8686
tags = [
8787
"integration-test",
File renamed without changes.

google/cloud/examples/README.md renamed to examples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ We use Docker to create an image with our "Greeter" service:
2020

2121
```shell
2222
docker build -t "gcr.io/${GOOGLE_CLOUD_PROJECT}/hello-world-grpc:latest" \
23-
-f google/cloud/examples/hello_world_grpc/Dockerfile \
24-
google/cloud/examples/hello_world_grpc
23+
-f examples/hello_world_grpc/Dockerfile \
24+
examples/hello_world_grpc
2525
```
2626

2727
### Push the Docker image to GCR
@@ -95,7 +95,7 @@ and use it from Cloud Run.
9595
pack build --builder gcr.io/buildpacks/builder:latest \
9696
--env "GOOGLE_FUNCTION_SIGNATURE_TYPE=http" \
9797
--env "GOOGLE_FUNCTION_TARGET=HelloWorldHttp" \
98-
--path "google/cloud/examples/hello_world_http/" \
98+
--path "examples/hello_world_http/" \
9999
"gcr.io/${GOOGLE_CLOUD_PROJECT}/hello-world-http"
100100
```
101101

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)