forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI / FIPS] Convert smoke tests to use FIPS agent (elastic#186858)
## Summary Closes elastic/kibana-operations#137 - Convert FIPS daily smoke test pipeline to use FIPS agents - This allows the smoke tests to run in parallel now - Removes FIPS Vagrant box from package testing - Adds verify FIPS enabled check to pipeline Pipeline run: https://buildkite.com/elastic/kibana-fips/builds/90
- Loading branch information
Showing
12 changed files
with
72 additions
and
346 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 |
---|---|---|
@@ -1,32 +1,63 @@ | ||
env: | ||
DISABLE_CI_STATS_SHIPPING: "true" | ||
DISABLE_CI_STATS_SHIPPING: 'true' | ||
KBN_ENABLE_FIPS: 'true' | ||
TEST_BROWSER_HEADLESS: 1 | ||
agents: | ||
provider: 'gcp' | ||
image: 'family/kibana-fips-ubuntu-2004' | ||
imageProject: 'elastic-images-prod' | ||
steps: | ||
- command: .buildkite/scripts/lifecycle/pre_build.sh | ||
label: Pre-Build | ||
key: pre-build | ||
timeout_in_minutes: 10 | ||
agents: | ||
machineType: n2-standard-2 | ||
|
||
- wait | ||
|
||
- command: .buildkite/scripts/steps/build_kibana.sh | ||
label: Build Kibana Distribution and Plugins | ||
agents: | ||
image: family/kibana-ubuntu-2004 | ||
imageProject: elastic-images-prod | ||
provider: gcp | ||
machineType: n2-standard-16 | ||
preemptible: true | ||
key: build | ||
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" | ||
depends_on: pre-build | ||
timeout_in_minutes: 60 | ||
retry: | ||
automatic: | ||
- exit_status: "-1" | ||
- exit_status: '-1' | ||
limit: 3 | ||
|
||
- wait | ||
|
||
- command: TEST_PACKAGE=fips .buildkite/scripts/steps/package_testing/test.sh | ||
label: "Smoke testing for FIPS" | ||
- command: .buildkite/scripts/steps/checks/verify_fips_enabled.sh | ||
label: 'Verify FIPS Enabled' | ||
depends_on: build | ||
timeout_in_minutes: 10 | ||
agents: | ||
machineType: n2-standard-2 | ||
preemptible: true | ||
|
||
- command: .buildkite/scripts/steps/fips/smoke_test.sh | ||
label: 'Pick Smoke Test Group Run Order' | ||
depends_on: build | ||
timeout_in_minutes: 10 | ||
env: | ||
FTR_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/ftr_configs.sh' | ||
FTR_EXTRA_ARGS: '$FTR_EXTRA_ARGS' | ||
LIMIT_CONFIG_TYPE: 'functional' | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- wait: ~ | ||
continue_on_failure: true | ||
|
||
- command: .buildkite/scripts/lifecycle/post_build.sh | ||
label: Post-Build | ||
timeout_in_minutes: 10 | ||
agents: | ||
image: family/kibana-ubuntu-2004 | ||
imageProject: elastic-images-prod | ||
provider: gcp | ||
enableNestedVirtualization: true | ||
localSsds: 1 | ||
localSsdInterface: nvme | ||
machineType: n2-standard-4 | ||
timeout_in_minutes: 600 | ||
machineType: n2-standard-2 |
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
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 |
---|---|---|
|
@@ -21,25 +21,17 @@ elif [[ "$TEST_PACKAGE" == "rpm" ]]; then | |
elif [[ "$TEST_PACKAGE" == "docker" ]]; then | ||
download_artifact "kibana-$KIBANA_PKG_VERSION*-docker-image.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" | ||
KIBANA_IP_ADDRESS="192.168.56.7" | ||
elif [[ "$TEST_PACKAGE" == "fips" ]]; then | ||
download_artifact kibana-default.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" | ||
download_artifact kibana-default-plugins.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" | ||
fi | ||
cd .. | ||
|
||
export VAGRANT_CWD=$PWD/test/package | ||
vagrant up "$TEST_PACKAGE" --no-provision | ||
|
||
if [[ "$TEST_PACKAGE" == "fips" ]]; then | ||
vagrant up "$TEST_PACKAGE" | ||
else | ||
vagrant up "$TEST_PACKAGE" --no-provision | ||
|
||
node scripts/es snapshot \ | ||
-E network.bind_host=127.0.0.1,192.168.56.1 \ | ||
-E discovery.type=single-node \ | ||
--license=trial & | ||
while ! timeout 1 bash -c "echo > /dev/tcp/localhost/9200"; do sleep 30; done | ||
fi | ||
node scripts/es snapshot \ | ||
-E network.bind_host=127.0.0.1,192.168.56.1 \ | ||
-E discovery.type=single-node \ | ||
--license=trial & | ||
while ! timeout 1 bash -c "echo > /dev/tcp/localhost/9200"; do sleep 30; done | ||
|
||
function echoKibanaLogs { | ||
if [[ "$TEST_PACKAGE" == "deb" ]] || [[ "$TEST_PACKAGE" == "rpm" ]]; then | ||
|
@@ -55,29 +47,13 @@ function echoKibanaLogs { | |
} | ||
trap "echoKibanaLogs" EXIT | ||
|
||
if [[ "$TEST_PACKAGE" == "fips" ]]; then | ||
set +e | ||
vagrant ssh $TEST_PACKAGE -t -c "/home/vagrant/kibana/.buildkite/scripts/steps/fips/smoke_test.sh" | ||
exitCode=$? | ||
|
||
vagrant ssh $TEST_PACKAGE -t -c "cat /home/vagrant/ftr_failed_configs 2>/dev/null" >ftr_failed_configs | ||
set -e | ||
|
||
if [ -s ftr_failed_configs ]; then | ||
cat ftr_failed_configs | buildkite-agent annotate --style "error" | ||
fi | ||
|
||
exit $exitCode | ||
else | ||
vagrant provision "$TEST_PACKAGE" | ||
vagrant provision "$TEST_PACKAGE" | ||
|
||
export TEST_BROWSER_HEADLESS=1 | ||
export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601" | ||
export TEST_ES_URL="http://elastic:[email protected]:9200" | ||
export TEST_BROWSER_HEADLESS=1 | ||
export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601" | ||
export TEST_ES_URL="http://elastic:[email protected]:9200" | ||
|
||
echo "--- FTR - Reporting" | ||
cd x-pack | ||
|
||
cd x-pack | ||
|
||
node scripts/functional_test_runner.js --config test/functional/apps/visualize/config.ts --include-tag=smoke --quiet | ||
fi | ||
echo "--- FTR - Reporting" | ||
node scripts/functional_test_runner.js --config test/functional/apps/visualize/config.ts --include-tag=smoke --quiet |
Empty file.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.