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

Don't merge for FEATURE BRANCH commits #9041

Merged
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
25 changes: 12 additions & 13 deletions .ci/gcb-community-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,31 @@ steps:
- user.name
- "Modular Magician Diff Process"

# Fetch main (only if it's not already present)
- name: "gcr.io/cloud-builders/git"
args:
- fetch
- origin
- main

# Display commit log for clarity
- name: "gcr.io/cloud-builders/git"
args:
- log
- "--oneline"
- "-n 10"

# Find common ancestor commit and apply diff for the .ci folder
# Find common ancestor commit and apply diff for the .ci folder.
- name: "gcr.io/cloud-builders/git"
id: findMergeBase
entrypoint: "bash"
args:
- "-c"
- |
base_commit=$(git merge-base origin/main HEAD)
echo "Common ancestor commit: $base_commit"
git diff $base_commit origin/main -- .ci/
git diff $base_commit origin/main -- .ci/ > /workspace/ci.diff
git apply /workspace/ci.diff --allow-empty
git fetch origin main
if [ "$_BASE_BRANCH" != "main" ]; then
echo "Checking out .ci/ folder from main"
git checkout origin/main -- .ci/
else
base_commit=$(git merge-base origin/main HEAD)
echo "Common ancestor commit: $base_commit"
git diff $base_commit upstream/main -- .ci/
git diff $base_commit upstream/main -- .ci/ > /workspace/ci.diff
git apply ./ci.diff --allow-empty
fi

- name: 'gcr.io/graphite-docker-images/go-plus'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
Expand Down
25 changes: 12 additions & 13 deletions .ci/gcb-contributor-membership-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,31 @@ steps:
- user.name
- "Modular Magician Diff Process"

# Fetch main (only if it's not already present)
- name: "gcr.io/cloud-builders/git"
args:
- fetch
- origin
- main

# Display commit log for clarity
- name: "gcr.io/cloud-builders/git"
args:
- log
- "--oneline"
- "-n 10"

# Find common ancestor commit and apply diff for the .ci folder
# Find common ancestor commit and apply diff for the .ci folder.
- name: "gcr.io/cloud-builders/git"
id: findMergeBase
entrypoint: "bash"
args:
- "-c"
- |
base_commit=$(git merge-base origin/main HEAD)
echo "Common ancestor commit: $base_commit"
git diff $base_commit origin/main -- .ci/
git diff $base_commit origin/main -- .ci/ > /workspace/ci.diff
git apply /workspace/ci.diff --allow-empty
git fetch origin main
if [ "$_BASE_BRANCH" != "main" ]; then
echo "Checking out .ci/ folder from main"
git checkout origin/main -- .ci/
else
base_commit=$(git merge-base origin/main HEAD)
echo "Common ancestor commit: $base_commit"
git diff $base_commit upstream/main -- .ci/
git diff $base_commit upstream/main -- .ci/ > /workspace/ci.diff
git apply ./ci.diff --allow-empty
fi

- name: "gcr.io/graphite-docker-images/go-plus"
entrypoint: "/workspace/.ci/scripts/go-plus/magician/exec.sh"
Expand Down