Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions .ci/containers/downstream-builder/generate_downstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function clone_repo() {
GH_REPO=terraform-google-conversion
LOCAL_PATH=$GOPATH/src/github.com/GoogleCloudPlatform/terraform-google-conversion
elif [ "$REPO" == "tf-oics" ]; then
if [ "$UPSTREAM_BRANCH" == "main"]; then
if [ "$UPSTREAM_BRANCH" == "main" ]; then
UPSTREAM_BRANCH=master
fi
UPSTREAM_OWNER=terraform-google-modules
Expand All @@ -48,7 +48,7 @@ function clone_repo() {
mkdir -p "$(dirname $LOCAL_PATH)"

echo "BASE_BRANCH: $BASE_BRANCH"
git clone $GITHUB_PATH $LOCAL_PATH --branch $BASE_BRANCH

@melinath melinath Jul 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than making this change - should this be cloning the $UPSTREAM_BRANCH instead? Since I think UPSTREAM_BRANCH is the base branch in the downstream (confusingly - possibly we should rename the variable)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, using $UPSTREAM_BRANCH should be working fine. I'll make the change

confusingly - possibly we should rename the variable

we do have a mix in use of the terms "upstream" and "downstream" when referring those generated repos. We should standardize them at some point, but probably not in this PR.

git clone $GITHUB_PATH $LOCAL_PATH --branch $UPSTREAM_BRANCH
}

if [ $# -lt 4 ]; then
Expand Down Expand Up @@ -236,4 +236,4 @@ if [ "$COMMITTED" == "true" ] && [ "$COMMAND" == "downstream" ]; then
"https://api.github.com/repos/$UPSTREAM_OWNER/$GH_REPO/pulls/$NEW_PR_NUMBER/merge"
fi

popd
popd
4 changes: 2 additions & 2 deletions .ci/containers/downstream-waiter/wait_for_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SYNC_BRANCH_PREFIX=$1
BASE_BRANCH=$2
SHA=$3

if [ "$BASE_BRANCH" == "main"]; then
if [ "$BASE_BRANCH" == "main" ]; then
SYNC_BRANCH=$SYNC_BRANCH_PREFIX
else
SYNC_BRANCH=$SYNC_BRANCH_PREFIX-$BASE_BRANCH
Expand All @@ -33,4 +33,4 @@ while true; do
git fetch origin $SYNC_BRANCH
fi
sleep 5
done
done