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 multiple repos.
  • Loading branch information
nat-henderson committed Sep 23, 2021
1 parent ffd75f1 commit 1508570
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
12 changes: 9 additions & 3 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
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

0 comments on commit 1508570

Please sign in to comment.