mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
adds [Performance Testing] Nightly Build Job (#114042)
Adds auto and manual performance tests If "ITERATION_COUNT_ENV" exist in build job: - Auto Mode: Checks "ITERATION_COUNT_ENV", - Manual Mode: Waits for user input, use provided value to run "n" number of performance tests on parallel - Sends slack notifications when pipeline finished
This commit is contained in:
parent
7968d9e079
commit
94285ae01a
3 changed files with 72 additions and 0 deletions
35
.buildkite/pipelines/performance/nightly.yml
Normal file
35
.buildkite/pipelines/performance/nightly.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
steps:
|
||||
- block: ":gear: Performance Tests Configuration"
|
||||
prompt: "Fill out the details for performance test"
|
||||
fields:
|
||||
- text: ":arrows_counterclockwise: Iterations"
|
||||
key: "performance-test-iteration-count"
|
||||
hint: "How many times you want to run tests? "
|
||||
required: true
|
||||
if: build.env('ITERATION_COUNT_ENV') == null
|
||||
|
||||
- label: ":male-mechanic::skin-tone-2: Pre-Build"
|
||||
command: .buildkite/scripts/lifecycle/pre_build.sh
|
||||
|
||||
- wait
|
||||
|
||||
- label: ":factory_worker: Build Kibana Distribution and Plugins"
|
||||
command: .buildkite/scripts/steps/build_kibana.sh
|
||||
agents:
|
||||
queue: c2-16
|
||||
key: build
|
||||
|
||||
- label: ":muscle: Performance Tests"
|
||||
command: .buildkite/scripts/steps/functional/performance.sh
|
||||
agents:
|
||||
queue: ci-group-6
|
||||
depends_on: build
|
||||
concurrency: 50
|
||||
concurrency_group: 'performance-test-group'
|
||||
|
||||
- wait: ~
|
||||
continue_on_failure: true
|
||||
|
||||
- label: ":male_superhero::skin-tone-2: Post-Build"
|
||||
command: .buildkite/scripts/lifecycle/post_build.sh
|
||||
|
20
.buildkite/scripts/steps/functional/performance.sh
Normal file
20
.buildkite/scripts/steps/functional/performance.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
if [ -z "${ITERATION_COUNT_ENV+x}" ]; then
|
||||
ITERATION_COUNT="$(buildkite-agent meta-data get performance-test-iteration-count)"
|
||||
else
|
||||
ITERATION_COUNT=$ITERATION_COUNT_ENV
|
||||
fi
|
||||
|
||||
tput setab 2; tput setaf 0; echo "Performance test will be run at ${BUILDKITE_BRANCH} ${ITERATION_COUNT} times"
|
||||
|
||||
cat << EOF | buildkite-agent pipeline upload
|
||||
steps:
|
||||
- command: .buildkite/scripts/steps/functional/performance_sub.sh
|
||||
parallelism: "$ITERATION_COUNT"
|
||||
EOF
|
||||
|
||||
|
||||
|
17
.buildkite/scripts/steps/functional/performance_sub.sh
Normal file
17
.buildkite/scripts/steps/functional/performance_sub.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source .buildkite/scripts/common/util.sh
|
||||
|
||||
.buildkite/scripts/bootstrap.sh
|
||||
.buildkite/scripts/download_build_artifacts.sh
|
||||
|
||||
cd "$XPACK_DIR"
|
||||
|
||||
echo --- Run Performance Tests
|
||||
checks-reporter-with-killswitch "Run Performance Tests" \
|
||||
node scripts/functional_tests \
|
||||
--debug --bail \
|
||||
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
|
||||
--config test/performance/config.ts;
|
Loading…
Add table
Add a link
Reference in a new issue