Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to containers to support DCL's build - open up test to work on more repos. #5238

Merged
merged 3 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .ci/containers/terraform-tester/test_terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ pr_number=$2
mm_commit_sha=$3
build_id=$4
project_id=$5
build_step=$6
repo_name=$6
build_step=$7
if [ -z "$7" ]; then
# an old run - any time after october 15 2021 this can be removed.
repo_name=GoogleCloudPlatform/magic-modules
build_step=$6
fi
github_username=modular-magician
if [ "$version" == "ga" ]; then
gh_repo=terraform-provider-google
Expand Down Expand Up @@ -47,7 +53,7 @@ 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" \
"https://api.github.com/repos/$repo_name/statuses/$mm_commit_sha" \
-d "$post_body"


Expand All @@ -61,7 +67,7 @@ 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" \
"https://api.github.com/repos/$repo_name/statuses/$mm_commit_sha" \
-d "$post_body"

set +e
Expand Down Expand Up @@ -108,7 +114,7 @@ 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" \
"https://api.github.com/repos/$repo_name/statuses/$mm_commit_sha" \
-d "$post_body"


Expand All @@ -122,5 +128,5 @@ 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" \
"https://api.github.com/repos/$repo_name/statuses/$mm_commit_sha" \
-d "$post_body"
2 changes: 2 additions & 0 deletions .ci/gcb-generate-diffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ steps:
- $COMMIT_SHA
- $BUILD_ID
- $PROJECT_ID
- GoogleCloudPlatform/magic-modules
- "22" # Build step

- name: 'gcr.io/graphite-docker-images/terraform-tester'
Expand All @@ -204,6 +205,7 @@ steps:
- $COMMIT_SHA
- $BUILD_ID
- $PROJECT_ID
- GoogleCloudPlatform/magic-modules
- "23" # Build step

- name: 'gcr.io/graphite-docker-images/terraform-vcr-tester'
Expand Down
5 changes: 4 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ SED_I := -i '' -E
ECHO_ARGS :=
endif

ifeq ($(FORCE_DCL),)
FORCE_DCL=latest
endif
terraform build:
make serialize
make mmv1
Expand Down Expand Up @@ -67,7 +70,7 @@ serialize:
upgrade-dcl:
cd tpgtools && \
go mod edit -dropreplace=github.com/GoogleCloudPlatform/declarative-resource-client-library &&\
go mod edit -require=github.com/GoogleCloudPlatform/declarative-resource-client-library@latest &&\
go mod edit -require=github.com/GoogleCloudPlatform/declarative-resource-client-library@$(FORCE_DCL) &&\
go mod tidy;\
MOD_LINE=$$(grep declarative-resource-client-library go.mod);\
SUM_LINE=$$(grep declarative-resource-client-library go.sum);\
Expand Down