Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliidm committed Jun 7, 2023
2 parents d1b32ab + 717358c commit 711fe3e
Show file tree
Hide file tree
Showing 6,438 changed files with 223,801 additions and 107,474 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
24 changes: 20 additions & 4 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ disabled:
- x-pack/test/security_solution_cypress/cases_cli_config.ts
- x-pack/test/security_solution_cypress/ccs_config.ts
- x-pack/test/security_solution_cypress/cli_config.ts
- x-pack/test/security_solution_cypress/cli_config_parallel.ts
- x-pack/test/security_solution_cypress/cli_config_investigations_parallel.ts
- x-pack/test/security_solution_cypress/config.firefox.ts
- x-pack/test/security_solution_cypress/config.ts
- x-pack/test/security_solution_cypress/response_ops_cli_config.ts
- x-pack/test/security_solution_cypress/upgrade_config.ts
- x-pack/test/security_solution_cypress/visual_config.ts
- x-pack/test/threat_intelligence_cypress/visual_config.ts
- x-pack/test/threat_intelligence_cypress/cli_config_parallel.ts
- x-pack/test/threat_intelligence_cypress/config.ts
Expand Down Expand Up @@ -79,6 +78,21 @@ disabled:
# Asset Manager configs, in tech preview, will move to enabled after more stability introduced
- x-pack/test/api_integration/apis/asset_manager/config.ts

# Serverless base config files
- x-pack/test_serverless/api_integration/config.base.ts
- x-pack/test_serverless/functional/config.base.ts
- x-pack/test_serverless/shared/config.base.ts

# Serverless configs, currently only for manual tests runs, CI integration planned
- x-pack/test_serverless/api_integration/test_suites/common/config.ts
- x-pack/test_serverless/api_integration/test_suites/observability/config.ts
- x-pack/test_serverless/api_integration/test_suites/search/config.ts
- x-pack/test_serverless/api_integration/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/common/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.ts

defaultQueue: 'n2-4-spot'
enabled:
- test/accessibility/config.ts
Expand Down Expand Up @@ -154,6 +168,7 @@ enabled:
- x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/config.ts
- x-pack/test/alerting_api_integration/spaces_only/tests/actions/config.ts
- x-pack/test/alerting_api_integration/spaces_only/tests/action_task_params/config.ts
- x-pack/test/alerting_api_integration/observability/config.ts
- x-pack/test/api_integration_basic/config.ts
- x-pack/test/api_integration/config_security_basic.ts
- x-pack/test/api_integration/config_security_trial.ts
Expand Down Expand Up @@ -225,7 +240,7 @@ enabled:
- x-pack/test/functional_basic/apps/ml/data_visualizer/group2/config.ts
- x-pack/test/functional_basic/apps/ml/data_visualizer/group3/config.ts
- x-pack/test/functional_basic/apps/transform/creation/index_pattern/config.ts
- x-pack/test/functional_basic/apps/transform/start_reset_delete/config.ts
- x-pack/test/functional_basic/apps/transform/actions/config.ts
- x-pack/test/functional_basic/apps/transform/edit_clone/config.ts
- x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/config.ts
- x-pack/test/functional_basic/apps/transform/permissions/config.ts
Expand Down Expand Up @@ -291,7 +306,7 @@ enabled:
- x-pack/test/functional/apps/status_page/config.ts
- x-pack/test/functional/apps/transform/creation/index_pattern/config.ts
- x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts
- x-pack/test/functional/apps/transform/start_reset_delete/config.ts
- x-pack/test/functional/apps/transform/actions/config.ts
- x-pack/test/functional/apps/transform/edit_clone/config.ts
- x-pack/test/functional/apps/transform/permissions/config.ts
- x-pack/test/functional/apps/transform/feature_controls/config.ts
Expand All @@ -310,6 +325,7 @@ enabled:
- x-pack/test/monitoring_api_integration/config.ts
- x-pack/test/observability_api_integration/basic/config.ts
- x-pack/test/observability_api_integration/trial/config.ts
- x-pack/test/observability_api_integration/apis/config.ts
- x-pack/test/observability_functional/with_rac_write.config.ts
- x-pack/test/plugin_api_integration/config.ts
- x-pack/test/plugin_functional/config.ts
Expand Down
14 changes: 14 additions & 0 deletions .buildkite/pipelines/on_merge_unsupported_ftrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/security_solution_investigations.sh
label: 'Investigations - Security Solution Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/synthetics_plugin.sh
label: 'Synthetics @elastic/synthetics Tests'
agents:
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/pull_request/defend_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 2
retry:
automatic:
- exit_status: '-1'
Expand Down
3 changes: 2 additions & 1 deletion .buildkite/pipelines/pull_request/osquery_cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ steps:
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 50
parallelism: 6
retry:
automatic:
- exit_status: '-1'
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/pull_request/response_ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
retry:
automatic:
- exit_status: '-1'
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pipelines/pull_request/security_solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ steps:
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
timeout_in_minutes: 60
parallelism: 7
retry:
automatic:
- exit_status: '-1'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
steps:
- command: .buildkite/scripts/steps/functional/security_solution_investigations.sh
label: 'Investigations - Security Solution Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
3 changes: 3 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const uploadPipeline = (pipelineContent: string | object) => {
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml'));
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/security_solution_investigations.yml')
);
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/defend_workflows.yml'));
}

Expand Down
33 changes: 16 additions & 17 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ set -euo pipefail
source .buildkite/scripts/steps/artifacts/env.sh

GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
KIBANA_IMAGE_INPUT="docker.elastic.co/kibana-ci/kibana-serverless:git-$GIT_ABBREV_COMMIT"
KIBANA_IMAGE_OUTPUT="docker.elastic.co/kibana-ci/kibana:git-$GIT_ABBREV_COMMIT"
KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless:git-$GIT_ABBREV_COMMIT"

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

if docker manifest inspect $KIBANA_IMAGE_OUTPUT &> /dev/null; then
if docker manifest inspect $KIBANA_IMAGE &> /dev/null; then
echo "Manifest already exists, exiting"
exit 1
fi
Expand All @@ -33,36 +32,36 @@ node scripts/build \
--skip-docker-contexts

echo "--- Tag images"
docker rmi "$KIBANA_IMAGE_INPUT"
docker rmi "$KIBANA_IMAGE"
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image.tar.gz"
docker tag "$KIBANA_IMAGE_INPUT" "$KIBANA_IMAGE_OUTPUT-amd64"
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-amd64"

docker rmi "$KIBANA_IMAGE_INPUT"
docker rmi "$KIBANA_IMAGE"
docker load < "target/kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz"
docker tag "$KIBANA_IMAGE_INPUT" "$KIBANA_IMAGE_OUTPUT-arm64"
docker tag "$KIBANA_IMAGE" "$KIBANA_IMAGE-arm64"

echo "--- Push images"
docker image push "$KIBANA_IMAGE_OUTPUT-arm64"
docker image push "$KIBANA_IMAGE_OUTPUT-amd64"
docker image push "$KIBANA_IMAGE-arm64"
docker image push "$KIBANA_IMAGE-amd64"

echo "--- Create manifest"
docker manifest create \
"$KIBANA_IMAGE_OUTPUT" \
--amend "$KIBANA_IMAGE_OUTPUT-arm64" \
--amend "$KIBANA_IMAGE_OUTPUT-amd64"
"$KIBANA_IMAGE" \
--amend "$KIBANA_IMAGE-arm64" \
--amend "$KIBANA_IMAGE-amd64"

echo "--- Push manifest"
docker manifest push "$KIBANA_IMAGE_OUTPUT"
docker manifest push "$KIBANA_IMAGE"
docker logout docker.elastic.co

cat << EOF | buildkite-agent annotate --style "info" --context image
### Container Images
Manifest: \`$KIBANA_IMAGE_OUTPUT\`
Manifest: \`$KIBANA_IMAGE\`
AMD64: \`$KIBANA_IMAGE_OUTPUT-amd64\`
AMD64: \`$KIBANA_IMAGE-amd64\`
ARM64: \`$KIBANA_IMAGE_OUTPUT-arm64\`
ARM64: \`$KIBANA_IMAGE-arm64\`
EOF

echo "--- Build dependencies report"
Expand Down Expand Up @@ -93,7 +92,7 @@ steps:
IMAGE_TAG: "git-$GIT_ABBREV_COMMIT"
SERVICE: kibana-controller
NAMESPACE: kibana-ci
IMAGE_NAME: kibana
IMAGE_NAME: kibana-serverless
COMMIT_MESSAGE: "gitops: update kibana tag to elastic/kibana@$GIT_ABBREV_COMMIT"
EOF

Expand Down
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export DISABLE_BOOTSTRAP_VALIDATION=false
.buildkite/scripts/bootstrap.sh

.buildkite/scripts/steps/checks/precommit_hook.sh
.buildkite/scripts/steps/checks/packages.sh
.buildkite/scripts/steps/checks/ts_projects.sh
.buildkite/scripts/steps/checks/packages.sh
.buildkite/scripts/steps/checks/bazel_packages.sh
Expand All @@ -22,4 +21,4 @@ export DISABLE_BOOTSTRAP_VALIDATION=false
.buildkite/scripts/steps/checks/test_projects.sh
.buildkite/scripts/steps/checks/test_hardening.sh
.buildkite/scripts/steps/checks/ftr_configs.sh
.buildkite/scripts/steps/checks/saved_objects_compat_changes.sh
.buildkite/scripts/steps/checks/saved_objects_compat_changes.sh
15 changes: 7 additions & 8 deletions .buildkite/scripts/steps/functional/defend_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

set -euo pipefail

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
node scripts/build_kibana_platform_plugins.js
source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-defend-workflows-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Defend Workflows Cypress tests"
Xvfb -screen 0 1680x946x24 :99 &

node scripts/functional_tests \
--debug --bail \
--config x-pack/test/defend_workflows_cypress/cli_config.ts
export DISPLAY=:99

echo "--- Defend Workflows Cypress tests"

yarn --cwd x-pack/plugins/security_solution cypress:dw:run
9 changes: 5 additions & 4 deletions .buildkite/scripts/steps/functional/osquery_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ source .buildkite/scripts/common/util.sh
.buildkite/scripts/bootstrap.sh
node scripts/build_kibana_platform_plugins.js

Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

export JOB=kibana-osquery-cypress

echo "--- Osquery Cypress tests"

node scripts/functional_tests \
--debug --bail \
--config x-pack/test/osquery_cypress/cli_config.ts

yarn --cwd x-pack/plugins/osquery cypress:run
10 changes: 6 additions & 4 deletions .buildkite/scripts/steps/functional/response_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ set -euo pipefail
source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb -screen 0 1680x946x24 :99 &

export DISPLAY=:99

echo "--- Response Ops Cypress Tests on Security Solution"

node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/response_ops_cli_config.ts
yarn --cwd x-pack/plugins/security_solution cypress:run:respops
10 changes: 6 additions & 4 deletions .buildkite/scripts/steps/functional/response_ops_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ set -euo pipefail
source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb -screen 0 1680x946x24 :99 &

export DISPLAY=:99

echo "--- Response Ops Cases Cypress Tests on Security Solution"

node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cases_cli_config.ts
yarn --cwd x-pack/plugins/security_solution cypress:run:cases
12 changes: 6 additions & 6 deletions .buildkite/scripts/steps/functional/security_solution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ set -euo pipefail
source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-security-solution-chrome
export CLI_NUMBER=${CLI_NUMBER:-$((BUILDKITE_PARALLEL_JOB+1))}
export CLI_COUNT=${CLI_COUNT:-$BUILDKITE_PARALLEL_JOB_COUNT}
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

echo "--- Security Solution tests (Chrome)"

node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/security_solution_cypress/cli_config_parallel.ts
yarn --cwd x-pack/plugins/security_solution cypress:run
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}


Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

echo "--- Investigations Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:investigations:run
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/storybooks/build_and_upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const STORYBOOKS = [
'language_documentation_popover',
'unified_search',
'random_sampling',
'text_based_editor',
];

const GITHUB_CONTEXT = 'Build and Publish Storybooks';
Expand Down
Loading

0 comments on commit 711fe3e

Please sign in to comment.