diff --git a/.buildkite/pipelines/security_solution/api_integration.yml b/.buildkite/pipelines/security_solution/api_integration.yml new file mode 100644 index 0000000000000..c51c4ad7aa3dc --- /dev/null +++ b/.buildkite/pipelines/security_solution/api_integration.yml @@ -0,0 +1,21 @@ +steps: + - label: Running exception_workflows:runner:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_workflows:runner:serverless + key: exception_workflows:runner:serverless + + - label: Running exception_operators_date_numeric_types:runner:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_operators_date_numeric_types:runner:serverless + key: exception_operators_date_numeric_types:runner:serverless + + - label: Running exception_operators_keyword_text_long:runner:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_operators_keyword_text_long:runner:serverless + key: exception_operators_keyword_text_long:runner:serverless + + - label: Running exception_operators_ips_text_array:runner:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_operators_ips_text_array:runner:serverless + key: exception_operators_ips_text_array:runner:serverless + + - label: Running rule_creation:runner:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_creation:runner:serverless + key: rule_creation:runner:serverless + diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh new file mode 100755 index 0000000000000..8d56ded0189c0 --- /dev/null +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh @@ -0,0 +1,24 @@ +#!/bin/bash +if [ -z "$1" ] + then + echo "No target script from the package.json file, is supplied" + exit 1 +fi + +source .buildkite/scripts/common/util.sh +.buildkite/scripts/bootstrap.sh + +buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" "true" + +echo "--- Serverless Security Second Quality Gate" +cd x-pack/test/security_solution_api_integration +set +e + +VAULT_DEC_KEY=$(retry 5 5 vault read -field=enc_key secret/kibana-issues/dev/security-solution-qg-enc-key) +ENV_PWD=$(echo $TEST_ENV_PWD | openssl aes-256-cbc -d -a -pass pass:$VAULT_DEC_KEY) + +# Removing the https:// part of the url provided in order to use it in the command below. +ES_URL="${TEST_ENV_ES_URL/https:\/\//}" +KB_URL="${TEST_ENV_KB_URL/https:\/\//}" + +TEST_CLOUD=1 TEST_ES_URL="https://elastic:$ENV_PWD@$ES_URL" TEST_KIBANA_URL="https://elastic:$ENV_PWD@$KB_URL" yarn run $1 \ No newline at end of file diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline-api-integration-tests.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline-api-integration-tests.sh deleted file mode 100755 index 41df379cfb1f9..0000000000000 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline-api-integration-tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -euo pipefail - -source .buildkite/scripts/common/util.sh -.buildkite/scripts/bootstrap.sh - -buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" "true" - -echo "--- Serverless Security Second Quality Gate" -cd x-pack/test/security_solution_api_integration -set +e - -VAULT_DEC_KEY=$(retry 5 5 vault read -field=enc_key secret/kibana-issues/dev/security-solution-qg-enc-key) -ENV_PWD=$(echo $TEST_ENV_PWD | openssl aes-256-cbc -d -a -pass pass:$VAULT_DEC_KEY) - -# Removing the https:// part of the url provided in order to use it in the command below. -ES_URL="${TEST_ENV_ES_URL/https:\/\//}" -KB_URL="${TEST_ENV_KB_URL/https:\/\//}" - -echo "Running the script exception_workflows:runner:serverless" -TEST_CLOUD=1 TEST_ES_URL="https://elastic:$ENV_PWD@$ES_URL" TEST_KIBANA_URL="https://elastic:$ENV_PWD@$KB_URL" yarn run exception_workflows:runner:serverless -echo "Running the script exception_operators_date_numeric_types:runner:serverless" -TEST_CLOUD=1 TEST_ES_URL="https://elastic:$ENV_PWD@$ES_URL" TEST_KIBANA_URL="https://elastic:$ENV_PWD@$KB_URL" yarn run exception_operators_date_numeric_types:runner:serverless -echo "Running the script exception_operators_keyword_text_long:runner:serverless" -TEST_CLOUD=1 TEST_ES_URL="https://elastic:$ENV_PWD@$ES_URL" TEST_KIBANA_URL="https://elastic:$ENV_PWD@$KB_URL" yarn run exception_operators_keyword_text_long:runner:serverless -echo "Running the script exception_operators_ips_text_array:runner:serverless" -TEST_CLOUD=1 TEST_ES_URL="https://elastic:$ENV_PWD@$ES_URL" TEST_KIBANA_URL="https://elastic:$ENV_PWD@$KB_URL" yarn run exception_operators_ips_text_array:runner:serverless -echo "Running the script rule_creation:runner:serverless" -TEST_CLOUD=1 TEST_ES_URL="https://elastic:$ENV_PWD@$ES_URL" TEST_KIBANA_URL="https://elastic:$ENV_PWD@$KB_URL" yarn run rule_creation:runner:serverless \ No newline at end of file