-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
831 changed files
with
9,311 additions
and
9,166 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
|
||
MM_LOCAL_PATH=$1 | ||
TPG_LOCAL_PATH=$2 | ||
mm_commit_sha=$3 | ||
build_id=$4 | ||
build_step=$5 | ||
project_id=$6 | ||
|
||
github_username=modular-magician | ||
|
||
set +e | ||
pushd $MM_LOCAL_PATH/tools/breaking-change-detector | ||
go test ./... | ||
exit_code=$? | ||
popd | ||
set -e | ||
|
||
|
||
if [ $exit_code -ne 0 ]; then | ||
state="failure" | ||
else | ||
state="success" | ||
fi | ||
|
||
post_body=$( jq -n \ | ||
--arg context "unit-tests-breaking-change-detector" \ | ||
--arg target_url "https://console.cloud.google.com/cloud-build/builds;region=global/${build_id};step=${build_step}?project=${project_id}" \ | ||
--arg state "${state}" \ | ||
'{context: $context, target_url: $target_url, state: $state}') | ||
|
||
curl \ | ||
-X POST \ | ||
-u "$github_username:$GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/$mm_commit_sha" \ | ||
-d "$post_body" | ||
|
||
set +e | ||
pushd $MM_LOCAL_PATH/tools/missing-test-detector | ||
PROVIDER_DIR=$TPG_LOCAL_PATH go test | ||
exit_code=$? | ||
popd | ||
set -e | ||
|
||
|
||
if [ $exit_code -ne 0 ]; then | ||
state="failure" | ||
else | ||
state="success" | ||
fi | ||
|
||
post_body=$( jq -n \ | ||
--arg context "unit-tests-missing-test-detector" \ | ||
--arg target_url "https://console.cloud.google.com/cloud-build/builds;region=global/${build_id};step=${build_step}?project=${project_id}" \ | ||
--arg state "${state}" \ | ||
'{context: $context, target_url: $target_url, state: $state}') | ||
|
||
curl \ | ||
-X POST \ | ||
-u "$github_username:$GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/$mm_commit_sha" \ | ||
-d "$post_body" | ||
|
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.