-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from Jenkins to Buildkite and GitHub Actions (#1679)
- Loading branch information
Showing
22 changed files
with
142 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
agents: | ||
provider: "gcp" | ||
image: family/core-ubuntu-2204 | ||
|
||
steps: | ||
- label: "Run 3.8 integration tests :test_tube:" | ||
command: bash .buildkite/it/run.sh 3.8 | ||
- label: "Run 3.10 integration tests :test_tube:" | ||
command: bash .buildkite/it/run.sh 3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eo pipefail | ||
|
||
# based on https://gist.github.com/sj26/88e1c6584397bb7c13bd11108a579746?permalink_comment_id=4155247#gistcomment-4155247 | ||
function retry { | ||
local retries=$1 | ||
shift | ||
local cmd=($@) | ||
local cmd_string="${@}" | ||
local count=0 | ||
|
||
# be lenient with non-zero exit codes, to allow retries | ||
set +o errexit | ||
set +o pipefail | ||
until "${cmd[@]}"; do | ||
retcode=$? | ||
wait=$(( 2 ** count )) | ||
count=$(( count + 1)) | ||
if [[ $count -le $retries ]]; then | ||
printf "Command [%s] failed. Retry [%d/%d] in [%d] seconds.\n" "$cmd_string" $count $retries $wait | ||
sleep $wait | ||
else | ||
printf "Exhausted all [%s] retries for command [%s]. Exiting.\n" "$cmd_string" $retries | ||
# restore settings to fail immediately on error | ||
set -o errexit | ||
set -o pipefail | ||
return $retcode | ||
fi | ||
done | ||
# restore settings to fail immediately on error | ||
set -o errexit | ||
set -o pipefail | ||
return 0 | ||
} | ||
echo "--- System dependencies" | ||
|
||
PYTHON_VERSION="$1" | ||
retry 5 sudo add-apt-repository --yes ppa:deadsnakes/ppa | ||
retry 5 sudo apt-get update | ||
retry 5 sudo apt-get install -y \ | ||
"python${PYTHON_VERSION}" "python${PYTHON_VERSION}-dev" "python${PYTHON_VERSION}-venv" \ | ||
git make jq docker \ | ||
openjdk-17-jdk-headless openjdk-11-jdk-headless \ | ||
zlib1g zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev | ||
export JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64 | ||
export JAVA17_HOME=/usr/lib/jvm/java-17-openjdk-amd64 | ||
|
||
echo "--- Run IT test :pytest:" | ||
|
||
export RALLY_HOME=$HOME | ||
export THESPLOG_FILE="${THESPLOG_FILE:-${RALLY_HOME}/.rally/logs/actor-system-internal.log}" | ||
# this value is in bytes, the default is 50kB. We increase it to 200kiB. | ||
export THESPLOG_FILE_MAXSIZE=${THESPLOG_FILE_MAXSIZE:-204800} | ||
# adjust the default log level from WARNING | ||
export THESPLOG_THRESHOLD="INFO" | ||
export TERM=dumb | ||
export LC_ALL=en_US.UTF-8 | ||
|
||
"python${PYTHON_VERSION}" -m venv .venv | ||
source .venv/bin/activate | ||
|
||
pip install nox | ||
nox -s "it-${PYTHON_VERSION}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"jobs": [ | ||
{ | ||
"enabled": true, | ||
"pipeline_slug": "rally", | ||
"allow_org_users": true | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,21 +47,3 @@ | |
publishers: | ||
- email: | ||
recipients: [email protected] | ||
- junit: | ||
allow-empty-results: true | ||
results: 'junit-py*.xml' | ||
keep-long-stdio: true | ||
- google-cloud-storage: | ||
credentials-id: 'elasticsearch-ci-gcs-plugin' | ||
uploads: | ||
- classic: | ||
file-pattern: '.rally/$BUILD_NUMBER.tar.bz2' | ||
storage-location: 'gs://elasticsearch-ci-artifacts/jobs/$JOB_NAME' | ||
share-publicly: false | ||
upload-for-failed-jobs: true | ||
show-inline: true | ||
builders: | ||
- inject: | ||
properties-content: | | ||
HOME=$JENKINS_HOME | ||
RALLY_HOME=$WORKSPACE |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.