Skip to content

Commit

Permalink
check in tpg into tfv repository (GoogleCloudPlatform#5641)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottSuarez authored and lcaggio committed Mar 17, 2022
1 parent b54cf9e commit 3f101e0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .ci/containers/downstream-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ ENV GO111MODULE "on"

# Install Ruby from source.
RUN apt-get update
RUN apt-get install -y bzip2 libssl-dev libreadline-dev zlib1g-dev unzip
RUN apt-get install -y rsync
RUN apt-get install -y bzip2 libssl-dev libreadline-dev zlib1g-dev unzip sed rsync
RUN git clone https://github.com/rbenv/rbenv.git /rbenv
ENV PATH /rbenv/bin:/root/.rbenv/shims:$PATH

Expand Down
9 changes: 8 additions & 1 deletion .ci/containers/downstream-builder/generate_downstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,23 @@ if [ "$REPO" == "terraform-validator" ] || [ "$REPO" == "tf-conversion" ]; then
# require a `google` folder to exist.
mkdir -p $LOCAL_PATH/google
fi

pushd $LOCAL_PATH
# clear out the templates as they are copied during
# generation from mmv1/third_party/validator/tests/data
rm -rf ./testdata/templates/
rm -rf ./testdata/generatedconvert/
git add ./testdata
rm -rf ./converters/google/provider
find ./test/** -type f -exec git rm {} \;

popd
bundle exec compiler -a -e terraform -f validator -o $LOCAL_PATH -v $VERSION
pushd $LOCAL_PATH

git clone --depth=1 --branch=$BRANCH https://modular-magician:$GITHUB_TOKEN@github.com/$SCRATCH_OWNER/terraform-provider-google converters/google/provider
rm -rf ./converters/google/provider/.git
go mod edit -replace github.com/hashicorp/terraform-provider-google/[email protected]=./converters/google/provider

make build
export TFV_CREATE_GENERATED_FILES=true
go test ./test -run "TestAcc.*_generated_offline"
Expand Down
4 changes: 2 additions & 2 deletions .ci/gcb-generate-diffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/downstream-builder'
id: tfv-head
secretEnv: ["GITHUB_TOKEN"]
waitFor: ["merged"]
waitFor: ["merged", "tpg-head"]
args:
- 'head'
- 'terraform-validator'
Expand All @@ -122,7 +122,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/downstream-builder'
id: tfv-base
secretEnv: ["GITHUB_TOKEN"]
waitFor: ["merged"]
waitFor: ["merged", "tpg-base"]
args:
- 'base'
- 'terraform-validator'
Expand Down
2 changes: 1 addition & 1 deletion .ci/gcb-push-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/downstream-builder'
secretEnv: ["GITHUB_TOKEN"]
id: tf-validator-push
waitFor: ["tf-validator-sync"]
waitFor: ["tf-validator-sync", "tpg-push"]
args:
- 'downstream'
- 'terraform-validator'
Expand Down

0 comments on commit 3f101e0

Please sign in to comment.