-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add snippet-test-labeling enforcement script (#1796)
* Add snippet-test-labeling enforcement script * Add Kokoro configs * Use clearer filenames * Update region-tags-tests.sh * Fix typo * Add firestore test * Whitelist region tags for functions * Whitelist/add region tags for appengine * Revert gitignore change * Fix trampoline typo * Add color + use (zsh-friendly) single quotes Co-authored-by: F. Hinkelmann <franziska.hinkelmann@gmail.com>
- Loading branch information
Showing
20 changed files
with
238 additions
and
121 deletions.
There are no files selected for viewing
This file contains 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,7 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Tell the trampoline which build file to use. | ||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: "github/nodejs-docs-samples/.kokoro/region-tags-tests.sh" | ||
} |
This file contains 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,44 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 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. | ||
|
||
export GCLOUD_PROJECT=nodejs-docs-samples-tests | ||
export NODE_ENV=development | ||
|
||
cd github/nodejs-docs-samples/ | ||
|
||
# Display link to docs | ||
echo '=================================================================' | ||
echo -e 'Test failing? See \e[36mgo/drift-test-tracker-onboarding\e[0m for more info!' | ||
echo '=================================================================' | ||
|
||
# Fetch XUnit CI enforcer script | ||
# curl-ing it ensures we get the latest version | ||
curl "https://raw.githubusercontent.com/GoogleCloudPlatform/repo-automation-playground/master/xunit-ci-enforcer/region_tag_enforcer.sh" > enforcer.sh | ||
chmod +x enforcer.sh | ||
|
||
# Run enforcer on appropriate directories | ||
STATUS=0 | ||
|
||
# Functions | ||
DIRS_LIST_FUNCTIONS=$(find functions -type d -name "*est" -not -path "*/node_modules/*" | xargs -I @ dirname @) | ||
./enforcer.sh $DIRS_LIST_FUNCTIONS || STATUS=$? | ||
|
||
# App Engine | ||
DIRS_LIST_APPENGINE=$(find appengine -type d -name "*est" -not -path "*/node_modules/*" | xargs -I @ dirname @) | ||
./enforcer.sh $DIRS_LIST_APPENGINE || STATUS=$? | ||
|
||
# Fail if any directory-label attempts failed | ||
exit $STATUS |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.