Skip to content

Commit

Permalink
Changes to containers to support DCL's build - open up test to work o…
Browse files Browse the repository at this point in the history
…n more repos. (GoogleCloudPlatform#5238)

* Changes to containers to support DCL's build - open up test to work on multiple repos.

* replace remaining magic-modules references

* upgrade dcl.
  • Loading branch information
nat-henderson authored and khajduczenia committed Oct 12, 2021
1 parent 16b5771 commit 4c0017a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
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
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/go.mod.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-google<%= "-" + version unless ve

require (
cloud.google.com/go/bigtable v1.10.1
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923164710-b8734d273ffb
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca
github.com/apparentlymart/go-cidr v1.1.0
github.com/client9/misspell v0.3.4
github.com/davecgh/go-spew v1.1.1
Expand Down
2 changes: 2 additions & 0 deletions mmv1/third_party/terraform/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1411,3 +1411,5 @@ github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-202109
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210918014849-ef8e2b337288/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923164710-b8734d273ffb h1:by1flCMHI4mpQYSUN5RIGUVv8FhVS+vgpzOqP/jgIVY=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923164710-b8734d273ffb/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca h1:mFy2An6ybqX6BTi0J2l2/sdqVF6EJW5AmqSeXC0L0sc=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
2 changes: 1 addition & 1 deletion tpgtools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
bitbucket.org/creachadair/stringset v0.0.9
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923164710-b8734d273ffb
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/hcl v1.0.0
Expand Down
4 changes: 2 additions & 2 deletions tpgtools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923164710-b8734d273ffb h1:by1flCMHI4mpQYSUN5RIGUVv8FhVS+vgpzOqP/jgIVY=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923164710-b8734d273ffb/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca h1:mFy2An6ybqX6BTi0J2l2/sdqVF6EJW5AmqSeXC0L0sc=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
Expand Down

0 comments on commit 4c0017a

Please sign in to comment.