-
Notifications
You must be signed in to change notification settings - Fork 25k
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
[ci] Migrate branch consistency and protection checks to Buildkite #101646
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
STATUS=$(curl -s "https://api.github.com/repos/elastic/elasticsearch/branches/$BUILDKITE_BRANCH" | jq '.protected') | ||
echo "Branch $BUILDKITE_BRANCH protection status is: $STATUS" | ||
if [[ "$STATUS" == "false" ]]; then | ||
echo "Development branch $BUILDKITE_BRANCH is not set as protected in GitHub but should be." | ||
exit 1 | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,10 @@ if ! uname -a | grep -q MING; then | |
export GLIBC_VERSION=$(ldd --version | grep '^ldd' | sed 's/.* \([1-9]\.[0-9]*\).*/\1/') | ||
fi | ||
|
||
# Running on 2-core machines without ramdisk can make this value be 0 | ||
if [[ "$MAX_WORKERS" == "0" ]]; then | ||
MAX_WORKERS=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we just make it the number of CPUs then in that case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, I think it only ends up as 0 if the number of CPUs is 1 or 2... I was thinking that on a 2-CPU machine, there might not really be enough resources to effectively run two tasks in parallel, what do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can leave it at one and tweak later. |
||
fi | ||
|
||
set -e | ||
$GRADLEW -S --max-workers=$MAX_WORKERS $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update the machine type on the BWC jobs as well? I just noticed one fail in intake today with a killed test worker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do that separately, I only changed this one in this branch because it's actually already this machine type, it's just not reflected in the template