Skip to content

Commit

Permalink
Merge branch 'main' into 6491_serverless-pli-endpoint-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 8, 2023
2 parents 5068316 + 8ff30aa commit c67ba35
Show file tree
Hide file tree
Showing 2,161 changed files with 62,070 additions and 19,303 deletions.
4 changes: 2 additions & 2 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ disabled:
- 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/threat_intelligence_cypress/visual_config.ts
- x-pack/test/threat_intelligence_cypress/cli_config_parallel.ts
- x-pack/test/threat_intelligence_cypress/config.ts
- x-pack/test/functional_enterprise_search/visual_config.ts
Expand All @@ -57,7 +56,8 @@ disabled:

# Elastic Synthetics configs
- x-pack/plugins/synthetics/e2e/config.ts
- x-pack/plugins/synthetics/e2e/synthetics_run.ts
- x-pack/plugins/synthetics/e2e/uptime/synthetics_run.ts
- x-pack/plugins/synthetics/e2e/synthetics/synthetics_run.ts
- x-pack/plugins/ux/e2e/synthetics_run.ts
- x-pack/plugins/exploratory_view/e2e/synthetics_run.ts

Expand Down
4 changes: 4 additions & 0 deletions .buildkite/pipelines/flaky_tests/groups.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"groups": [
{
"key": "cypress/security_solution_investigations",
"name": "Security Solution Investigations - Cypress"
},
{
"key": "cypress/security_solution",
"name": "Security Solution - Cypress"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/exploratory_view/e2e/.journeys/**/*'
retry:
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
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: 15
timeout_in_minutes: 60
parallelism: 7
retry:
automatic:
- exit_status: '-1'
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/synthetics_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/synthetics/e2e/.journeys/**/*'
retry:
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/threat_intelligence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
parallelism: 2
retry:
automatic:
- exit_status: '-1'
Expand Down
15 changes: 15 additions & 0 deletions .buildkite/pipelines/pull_request/uptime_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
steps:
- command: .buildkite/scripts/steps/functional/uptime_plugin.sh
label: 'Uptime @elastic/synthetics Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/synthetics/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
2 changes: 1 addition & 1 deletion .buildkite/pipelines/pull_request/ux_plugin_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 60
artifact_paths:
- 'x-pack/plugins/ux/e2e/.journeys/**/*'
retry:
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const uploadPipeline = (pipelineContent: string | object) => {
])
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/synthetics_plugin.yml'));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime_plugin.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/ux/, /^x-pack\/plugins\/exploratory_view/])) {
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
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
12 changes: 6 additions & 6 deletions .buildkite/scripts/steps/functional/threat_intelligence.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-threat-intelligence-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 "--- Threat Intelligence tests (Chrome)"

node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config x-pack/test/threat_intelligence_cypress/cli_config_parallel.ts
yarn --cwd x-pack/plugins/threat_intelligence cypress:run
16 changes: 16 additions & 0 deletions .buildkite/scripts/steps/functional/uptime_plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

export JOB=kibana-uptime-plugin

echo "--- Uptime plugin @elastic/synthetics Tests"

cd "$XPACK_DIR"

node plugins/synthetics/scripts/uptime_e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ x-pack/packages/maps/vector_tile_utils @elastic/kibana-gis
x-pack/packages/ml/agg_utils @elastic/ml-ui
x-pack/packages/ml/anomaly_utils @elastic/ml-ui
x-pack/packages/ml/data_frame_analytics_utils @elastic/ml-ui
x-pack/packages/ml/data_grid @elastic/ml-ui
x-pack/packages/ml/date_picker @elastic/ml-ui
x-pack/packages/ml/date_utils @elastic/ml-ui
x-pack/packages/ml/error_utils @elastic/ml-ui
x-pack/packages/ml/is_defined @elastic/ml-ui
x-pack/packages/ml/is_populated_object @elastic/ml-ui
Expand All @@ -476,6 +478,7 @@ x-pack/plugins/ml @elastic/ml-ui
x-pack/packages/ml/query_utils @elastic/ml-ui
x-pack/packages/ml/random_sampler_utils @elastic/ml-ui
x-pack/packages/ml/route_utils @elastic/ml-ui
x-pack/packages/ml/runtime_field_utils @elastic/ml-ui
x-pack/packages/ml/string_hash @elastic/ml-ui
x-pack/packages/ml/trained_models_utils @elastic/ml-ui
x-pack/packages/ml/url_state @elastic/ml-ui
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ npm-debug.log*

## @cypress/snapshot from apm plugin
/snapshots.js
x-pack/plugins/apm/scripts/apm-diagnostics*.json

# transpiled cypress config
x-pack/plugins/fleet/cypress.config.d.ts
Expand Down Expand Up @@ -130,3 +131,4 @@ fleet-server.yml
**/.synthetics/
**/.journeys/
x-pack/test/security_api_integration/plugins/audit_log/audit.log

2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the actions plugin
date: 2023-06-05
date: 2023-06-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
description: API docs for the advancedSettings plugin
date: 2023-06-05
date: 2023-06-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/aiops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiops plugin
date: 2023-06-05
date: 2023-06-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
Loading

0 comments on commit c67ba35

Please sign in to comment.