-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
action: support for benchmark using GitHub actions in conjunction wit…
…h Buildkite (#3374) * ci: remove Jenkins * support for benchmark using GitHub actions in conjunction with Buildkite * chore: for testing purposes * remove any Jenkins references * add buildkite log echo for helping with collapsing the output in the UI this will not show make the UI better in GitHub actions though * action: group logs * Revert "action: group logs" This reverts commit 92bcd6c. * move the traces earlier * debug what's going on * use the installation steps explained in https://github.com/nvm-sh/nvm * use install manually as explained in https://github.com/nvm-sh/nvm\#manual-install * Revert "use install manually as explained in https://github.com/nvm-sh/nvm\#manual-install" This reverts commit 0af0553. * install only if it is not installed * debug whether shell login * avoid errors when calling the nvm for the first time * support buildkite missbehaviour * remove debug * revert changes to be similar to the previous configuration * debug * reduce log traces * Update .ci/scripts/bench.sh * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Trent Mick <[email protected]> * ci: small format cleanup Signed-off-by: Adrien Mannocci <[email protected]> * ci: let's debug nvm install Signed-off-by: Adrien Mannocci <[email protected]> * ci: correct benchmark prepare step Signed-off-by: Adrien Mannocci <[email protected]> * ci: flush positional arguments and use major version Signed-off-by: Adrien Mannocci <[email protected]> * ci: properly set NODE_VERSION env var Signed-off-by: Adrien Mannocci <[email protected]> * ci: use nvmrc instead of explicit value Signed-off-by: Adrien Mannocci <[email protected]> * ci: small cleanup Signed-off-by: Adrien Mannocci <[email protected]> * ci: last cleanup before merge Signed-off-by: Adrien Mannocci <[email protected]> * ci: remove leftover jenkins job scheduling Signed-off-by: Adrien Mannocci <[email protected]> --------- Signed-off-by: Adrien Mannocci <[email protected]> Co-authored-by: Trent Mick <[email protected]> Co-authored-by: Adrien Mannocci <[email protected]>
- Loading branch information
1 parent
c98f14a
commit 230740e
Showing
13 changed files
with
126 additions
and
278 deletions.
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 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 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 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.