-
Notifications
You must be signed in to change notification settings - Fork 229
action: support for benchmark using GitHub actions in conjunction with Buildkite #3374
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
ee34868
ci: remove Jenkins
v1v 134f661
support for benchmark using GitHub actions in conjunction with Buildkite
v1v 25da754
chore: for testing purposes
v1v 3a492a4
remove any Jenkins references
v1v 3ce8b75
add buildkite log echo for helping with collapsing the output in the UI
v1v 40be52b
action: group logs
v1v 7e6f10c
Revert "action: group logs"
v1v 0844dd3
move the traces earlier
v1v 9981263
debug what's going on
v1v 333a15d
use the installation steps explained in https://github.com/nvm-sh/nvm
v1v 2a12181
use install manually as explained in https://github.com/nvm-sh/nvm\#m…
v1v 004273d
Revert "use install manually as explained in https://github.com/nvm-s…
v1v 73f6c34
install only if it is not installed
v1v c1a471f
debug whether shell login
v1v f4acdc8
avoid errors when calling the nvm for the first time
v1v 5386243
support buildkite missbehaviour
v1v daed361
remove debug
v1v ac1e989
revert changes to be similar to the previous configuration
v1v 675b986
debug
v1v 63f3c2e
reduce log traces
v1v 63b56d7
Update .ci/scripts/bench.sh
v1v be6421a
Apply suggestions from code review
v1v 6e45e21
Apply suggestions from code review
v1v 056e2c5
Apply suggestions from code review
v1v 581fbbb
ci: small format cleanup
amannocci 96e60cf
ci: let's debug nvm install
amannocci 419e217
ci: correct benchmark prepare step
amannocci b0804c1
ci: flush positional arguments and use major version
amannocci a4535eb
ci: properly set NODE_VERSION env var
amannocci f0c511a
ci: use nvmrc instead of explicit value
amannocci 76c86e3
ci: small cleanup
amannocci 50f952e
ci: last cleanup before merge
amannocci edcee09
ci: remove leftover jenkins job scheduling
amannocci File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 contains hidden or 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,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Bash strict mode | ||
set -eo pipefail | ||
|
||
# Found current script directory | ||
RELATIVE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
# Found project directory | ||
BASE_PROJECT="$(dirname "$(dirname "${RELATIVE_DIR}")")" | ||
|
||
# Run the microbenchmark in Buildkite and for such | ||
# it configures the required settings in the Buildkite runners | ||
# to execute the benchmarks afterwards | ||
|
||
## Buildkite specific configuration | ||
if [ "${CI}" == "true" ] ; then | ||
# If HOME is not set then use the Buildkite workspace | ||
# that's normally happening when running in the CI | ||
# owned by Elastic. | ||
if [ -z "${HOME}" ] ; then | ||
HOME="${BUILDKITE_BUILD_CHECKOUT_PATH}" | ||
export HOME | ||
fi | ||
fi | ||
|
||
# Run benchmark | ||
echo "--- Execute benchmarks" | ||
"${BASE_PROJECT}/.ci/scripts/run-benchmarks.sh" "apm-agent-benchmark-results.json" "$(cat "${BASE_PROJECT}/.nvmrc")" | ||
|
||
echo "--- Send benchmark results" | ||
sendBenchmark "${ES_USER_SECRET}" "${ES_PASS_SECRET}" "${ES_URL_SECRET}" "apm-agent-benchmark-results.json" |
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
@@ -1,14 +1,25 @@ | ||
#!/usr/bin/env bash | ||
set -xueo pipefail | ||
|
||
# Bash strict mode | ||
set -eo pipefail | ||
|
||
# Found current script directory | ||
RELATIVE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
# Found project directory | ||
BASE_PROJECT="$(dirname "$(dirname "${RELATIVE_DIR}")")" | ||
|
||
# Arguments | ||
RESULT_FILE=$1 | ||
NODE_VERSION=$2 | ||
if [[ -z "$RESULT_FILE" || -z "$NODE_VERSION" ]]; then | ||
echo "usage: run-benchmarks.sh RESULT_FILE NODE_VERSION" | ||
exit 1 | ||
fi | ||
|
||
SCRIPTPATH=$(dirname "$0") | ||
source ./${SCRIPTPATH}/prepare-benchmarks-env.sh | ||
# Prepare benchmark environment | ||
export NODE_VERSION="${NODE_VERSION}" | ||
source "${RELATIVE_DIR}/prepare-benchmarks-env.sh" | ||
|
||
# Run benchmark | ||
npm run bench:ci "${RESULT_FILE}" "${NODE_VERSION}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.