-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ilm/fix-node-allocation-field
- Loading branch information
Showing
1,004 changed files
with
20,878 additions
and
4,466 deletions.
There are no files selected for viewing
568 changes: 286 additions & 282 deletions
568
.buildkite/pipelines/security_solution/api_integration.yml
Large diffs are not rendered by default.
Oops, something went wrong.
184 changes: 105 additions & 79 deletions
184
.buildkite/pipelines/security_solution/security_solution_cypress.yml
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,96 +1,122 @@ | ||
steps: | ||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore | ||
label: 'Serverless MKI QA Explore - Security Solution Cypress Tests' | ||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/create_periodic_test_docker_image.sh | ||
label: Build kibana image | ||
key: build_image | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 4 | ||
queue: n2-16-spot | ||
timeout_in_minutes: 60 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
- exit_status: "-1" | ||
limit: 3 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations | ||
label: 'Serverless MKI QA Investigations - Security Solution Cypress Tests' | ||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/upload_image_metadata.sh | ||
label: "Upload runtime info" | ||
key: upload_runtime_info | ||
depends_on: build_image | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 8 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
- exit_status: "*" | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:rule_management | ||
label: 'Serverless MKI QA Rule Management - Security Solution Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 8 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
- group: "Execute Tests" | ||
depends_on: build_image | ||
steps: | ||
# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore | ||
# label: 'Serverless MKI QA Explore - Security Solution Cypress Tests' | ||
# agents: | ||
# queue: n2-4-spot | ||
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
# timeout_in_minutes: 300 | ||
# parallelism: 4 | ||
# retry: | ||
# automatic: | ||
# - exit_status: '*' | ||
# limit: 1 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:rule_management:prebuilt_rules | ||
label: 'Serverless MKI QA Rule Management - Prebuilt Rules - Security Solution Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 2 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations | ||
# label: 'Serverless MKI QA Investigations - Security Solution Cypress Tests' | ||
# agents: | ||
# queue: n2-4-spot | ||
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
# timeout_in_minutes: 300 | ||
# parallelism: 8 | ||
# retry: | ||
# automatic: | ||
# - exit_status: '*' | ||
# limit: 1 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:detection_engine | ||
label: 'Serverless MKI QA Detection Engine - Security Solution Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 8 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:rule_management | ||
# label: 'Serverless MKI QA Rule Management - Security Solution Cypress Tests' | ||
# agents: | ||
# queue: n2-4-spot | ||
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
# timeout_in_minutes: 300 | ||
# parallelism: 8 | ||
# retry: | ||
# automatic: | ||
# - exit_status: '*' | ||
# limit: 1 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:detection_engine:exceptions | ||
label: 'Serverless MKI QA Detection Engine - Exceptions - Security Solution Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 6 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:rule_management:prebuilt_rules | ||
# label: 'Serverless MKI QA Rule Management - Prebuilt Rules - Security Solution Cypress Tests' | ||
# agents: | ||
# queue: n2-4-spot | ||
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
# timeout_in_minutes: 300 | ||
# parallelism: 2 | ||
# retry: | ||
# automatic: | ||
# - exit_status: '*' | ||
# limit: 1 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:ai_assistant | ||
label: 'Serverless MKI QA AI Assistant - Security Solution Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 1 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:detection_engine | ||
# label: 'Serverless MKI QA Detection Engine - Security Solution Cypress Tests' | ||
# agents: | ||
# queue: n2-4-spot | ||
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
# timeout_in_minutes: 300 | ||
# parallelism: 8 | ||
# retry: | ||
# automatic: | ||
# - exit_status: '*' | ||
# limit: 1 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:entity_analytics | ||
label: 'Serverless MKI QA Entity Analytics - Security Solution Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 2 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:detection_engine:exceptions | ||
# label: 'Serverless MKI QA Detection Engine - Exceptions - Security Solution Cypress Tests' | ||
# agents: | ||
# queue: n2-4-spot | ||
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
# timeout_in_minutes: 300 | ||
# parallelism: 6 | ||
# retry: | ||
# automatic: | ||
# - exit_status: '*' | ||
# limit: 1 | ||
|
||
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:ai_assistant | ||
label: 'Serverless MKI QA AI Assistant - Security Solution Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
timeout_in_minutes: 300 | ||
parallelism: 1 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:entity_analytics | ||
# label: 'Serverless MKI QA Entity Analytics - Security Solution Cypress Tests' | ||
# agents: | ||
# queue: n2-4-spot | ||
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. | ||
# timeout_in_minutes: 300 | ||
# parallelism: 2 | ||
# retry: | ||
# automatic: | ||
# - exit_status: '*' | ||
# limit: 1 |
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
83 changes: 83 additions & 0 deletions
83
...ite/scripts/pipelines/security_solution_quality_gate/create_periodic_test_docker_image.sh
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,83 @@ | ||
#!/bin/bash | ||
if [ -z "${KIBANA_MKI_USE_LATEST_COMMIT+x}" ] || [ "$KIBANA_MKI_USE_LATEST_COMMIT" = "0" ]; then | ||
echo "As we not testing against latest kibana image, this step is exiting with exit code 0" | ||
exit 0 | ||
fi | ||
|
||
|
||
.buildkite/scripts/bootstrap.sh | ||
|
||
source .buildkite/scripts/steps/artifacts/env.sh | ||
|
||
GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12} | ||
KIBANA_IMAGE_TAG="sec-sol-qg-$GIT_ABBREV_COMMIT" | ||
|
||
|
||
KIBANA_BASE_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless" | ||
export KIBANA_IMAGE="$KIBANA_BASE_IMAGE:$KIBANA_IMAGE_TAG" | ||
|
||
echo "--- Verify manifest does not already exist" | ||
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co | ||
trap 'docker logout docker.elastic.co' EXIT | ||
|
||
echo "Checking manifest for $KIBANA_IMAGE" | ||
if docker manifest inspect $KIBANA_IMAGE &> /dev/null; then | ||
echo "Manifest already exists, exiting" | ||
exit 0 | ||
fi | ||
|
||
docker pull $KIBANA_BASE_IMAGE:latest | ||
|
||
echo "--- Build images" | ||
node scripts/build \ | ||
--debug \ | ||
--release \ | ||
--docker-cross-compile \ | ||
--docker-images \ | ||
--docker-namespace="kibana-ci" \ | ||
--docker-tag="$KIBANA_IMAGE_TAG" \ | ||
--skip-docker-ubuntu \ | ||
--skip-docker-ubi \ | ||
--skip-docker-cloud \ | ||
--skip-docker-contexts \ | ||
--skip-cdn-assets | ||
|
||
echo "--- Tag images" | ||
docker rmi "$KIBANA_IMAGE" | ||
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image.tar.gz" | ||
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-amd64" | ||
|
||
docker rmi "$KIBANA_IMAGE" | ||
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz" | ||
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-arm64" | ||
|
||
echo "--- Push images" | ||
docker image push "$KIBANA_IMAGE-arm64" | ||
docker image push "$KIBANA_IMAGE-amd64" | ||
|
||
echo "--- Create and push manifests" | ||
docker manifest create \ | ||
"$KIBANA_IMAGE" \ | ||
--amend "$KIBANA_IMAGE-arm64" \ | ||
--amend "$KIBANA_IMAGE-amd64" | ||
docker manifest push "$KIBANA_IMAGE" | ||
|
||
if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then | ||
docker manifest create \ | ||
"$KIBANA_BASE_IMAGE:latest" \ | ||
--amend "$KIBANA_IMAGE-arm64" \ | ||
--amend "$KIBANA_IMAGE-amd64" | ||
docker manifest push "$KIBANA_BASE_IMAGE:latest" | ||
fi | ||
|
||
docker logout docker.elastic.co | ||
|
||
cat << EOF | buildkite-agent annotate --style "info" --context image | ||
### Serverless Images | ||
Manifest: \`$KIBANA_IMAGE\` | ||
AMD64: \`$KIBANA_IMAGE-amd64\` | ||
ARM64: \`$KIBANA_IMAGE-arm64\` | ||
EOF |
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
27 changes: 27 additions & 0 deletions
27
.buildkite/scripts/pipelines/security_solution_quality_gate/upload_image_metadata.sh
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,27 @@ | ||
#!/bin/bash | ||
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co | ||
|
||
KIBANA_BASE_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless" | ||
KIBANA_CURRENT_COMMIT=${KIBANA_BASE_IMAGE}:sec-sol-qg-${BUILDKITE_COMMIT:0:12} | ||
KIBANA_LATEST=${KIBANA_BASE_IMAGE}:latest | ||
|
||
if [ "$KIBANA_MKI_USE_LATEST_COMMIT" = "1" ]; then | ||
KBN_IMAGE=${KIBANA_CURRENT_COMMIT} | ||
else | ||
KBN_IMAGE=${KIBANA_LATEST} | ||
fi | ||
|
||
docker pull ${KBN_IMAGE} | ||
build_date=$(docker inspect ${KBN_IMAGE} | jq -r '.[0].Config.Labels."org.label-schema.build-date"') | ||
vcs_ref=$(docker inspect ${KBN_IMAGE} | jq -r '.[0].Config.Labels."org.label-schema.vcs-ref"') | ||
vcs_url=$(docker inspect ${KBN_IMAGE} | jq -r '.[0].Config.Labels."org.label-schema.vcs-url"') | ||
version=$(docker inspect ${KBN_IMAGE} | jq -r '.[0].Config.Labels."org.label-schema.version"') | ||
|
||
markdown_text=""" | ||
# Kibana Container Metadata | ||
- Build Date : $build_date | ||
- Github Commit Hash : $vcs_ref | ||
- Github Repo : $vcs_url | ||
- Version : $version | ||
""" | ||
echo "${markdown_text//[*\\_]/\\&}" | buildkite-agent annotate --style "info" |
Validating CODEOWNERS rules …
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
Oops, something went wrong.