Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into task/agent-tamperin…
Browse files Browse the repository at this point in the history
…g-with-defend-only
  • Loading branch information
parkiino committed Aug 10, 2023
2 parents c3ac2ca + 37a53b6 commit c28a708
Show file tree
Hide file tree
Showing 935 changed files with 34,993 additions and 3,311 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/artifacts_container_image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- command: .buildkite/scripts/steps/artifacts/docker_image.sh
label: Build default container images
label: Build serverless container images
agents:
queue: n2-16-spot
timeout_in_minutes: 60
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/security_solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ steps:
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_solution_burn.sh
label: 'Security Solution Cypress tests, burning changed specs'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 1
soft_fail: true
artifact_paths:
- "target/kibana-security-solution/**/*"
26 changes: 0 additions & 26 deletions .buildkite/scripts/build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,6 @@ if is_pr_with_label "ci:build-cloud-image"; then
EOF
fi

if is_pr_with_label "ci:build-serverless-image"; then
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
node scripts/build \
--skip-initialize \
--skip-generic-folders \
--skip-platform-folders \
--skip-archives \
--docker-images \
--docker-namespace="kibana-ci" \
--docker-tag="pr-$BUILDKITE_PULL_REQUEST-$GIT_ABBREV_COMMIT" \
--docker-push \
--skip-docker-ubi \
--skip-docker-ubuntu \
--skip-docker-cloud \
--skip-docker-contexts
docker logout docker.elastic.co

SERVERLESS_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-serverless)
buildkite-agent meta-data set pr_comment:deploy_cloud:head "* Kibana Serverless Image: \`$SERVERLESS_IMAGE\`"
cat << EOF | buildkite-agent annotate --style "info" --context kibana-serverless-image
Kibana Serverless Image: \`$SERVERLESS_IMAGE\`
EOF
fi

echo "--- Archive Kibana Distribution"
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$KIBANA_DIR/install/kibana"
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ const uploadPipeline = (pipelineContent: string | object) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/deploy_cloud.yml'));
}

if (GITHUB_PR_LABELS.includes('ci:build-serverless-image')) {
pipeline.push(getPipeline('.buildkite/pipelines/artifacts_container_image.yml'));
}

if (
(await doAnyChangesMatch([/.*stor(ies|y).*/])) ||
GITHUB_PR_LABELS.includes('ci:build-storybooks')
Expand Down
20 changes: 16 additions & 4 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ set -euo pipefail
source .buildkite/scripts/steps/artifacts/env.sh

GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless:git-$GIT_ABBREV_COMMIT"
if [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then
KIBANA_IMAGE_TAG="git-$GIT_ABBREV_COMMIT"
else
KIBANA_IMAGE_TAG="pr-$BUILDKITE_PULL_REQUEST-$GIT_ABBREV_COMMIT"
fi

KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless:$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 1
Expand All @@ -25,7 +32,7 @@ node scripts/build \
--docker-cross-compile \
--docker-images \
--docker-namespace="kibana-ci" \
--docker-tag="git-$GIT_ABBREV_COMMIT" \
--docker-tag="$KIBANA_IMAGE_TAG" \
--skip-docker-ubuntu \
--skip-docker-ubi \
--skip-docker-cloud \
Expand Down Expand Up @@ -55,7 +62,7 @@ docker manifest push "$KIBANA_IMAGE"
docker logout docker.elastic.co

cat << EOF | buildkite-agent annotate --style "info" --context image
### Container Images
### Serverless Images
Manifest: \`$KIBANA_IMAGE\`
Expand All @@ -64,6 +71,11 @@ cat << EOF | buildkite-agent annotate --style "info" --context image
ARM64: \`$KIBANA_IMAGE-arm64\`
EOF

if [[ "${BUILDKITE_PULL_REQUEST:-false}" != "false" ]]; then
buildkite-agent meta-data set pr_comment:build_serverless:head "* Kibana Serverless Image: \`$KIBANA_IMAGE\`"
buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID"
fi

echo "--- Build dependencies report"
node scripts/licenses_csv_report "--csv=target/dependencies-$GIT_ABBREV_COMMIT.csv"

Expand All @@ -80,7 +92,7 @@ cd -
# so that new stack instances contain the latest and greatest image of kibana,
# and the respective stack components of course.
echo "--- Trigger image tag update"
if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]]; then
if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then
cat << EOF | buildkite-agent pipeline upload
steps:
- label: ":argo: Update kibana image tag for kibana-controller using gpctl"
Expand Down
15 changes: 15 additions & 0 deletions .buildkite/scripts/steps/functional/security_solution_burn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -euo pipefail

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

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

buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'false'

echo "--- Security Solution Cypress tests, burning changed specs (Chrome)"

yarn --cwd x-pack/plugins/security_solution cypress:changed-specs-only
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ src/plugins/screenshot_mode @elastic/appex-sharedux
x-pack/examples/screenshotting_example @elastic/appex-sharedux
x-pack/plugins/screenshotting @elastic/kibana-reporting-services
examples/search_examples @elastic/kibana-data-discovery
packages/kbn-search-response-warnings @elastic/kibana-data-discovery
x-pack/plugins/searchprofiler @elastic/platform-deployment-management
x-pack/test/security_api_integration/packages/helpers @elastic/kibana-core
x-pack/plugins/security @elastic/kibana-security
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"server": "src/legacy/server",
"share": "src/plugins/share",
"sharedUXPackages": "packages/shared-ux",
"searchResponseWarnings": "packages/kbn-search-response-warnings",
"securitySolutionPackages": "x-pack/packages/security-solution",
"serverlessPackages": "packages/serverless",
"coloring": "packages/kbn-coloring/src",
Expand Down
4 changes: 4 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ yarn_install(
quiet = False,
frozen_lockfile = False,
environment = {
"GECKODRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNBINARIESURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"SASS_BINARY_SITE": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass",
"RE2_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2",
"CYPRESS_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress",
}
)
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-08-08
date: 2023-08-10
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-08-08
date: 2023-08-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
Expand Down
159 changes: 81 additions & 78 deletions api_docs/aiops.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,69 @@
"path": "x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "aiops",
"id": "def-public.AiopsAppDependencies.presentationUtil",
"type": "Object",
"tags": [],
"label": "presentationUtil",
"description": [],
"signature": [
{
"pluginId": "presentationUtil",
"scope": "public",
"docId": "kibPresentationUtilPluginApi",
"section": "def-public.PresentationUtilPluginStart",
"text": "PresentationUtilPluginStart"
},
" | undefined"
],
"path": "x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "aiops",
"id": "def-public.AiopsAppDependencies.embeddable",
"type": "Object",
"tags": [],
"label": "embeddable",
"description": [],
"signature": [
{
"pluginId": "embeddable",
"scope": "public",
"docId": "kibEmbeddablePluginApi",
"section": "def-public.EmbeddableStart",
"text": "EmbeddableStart"
},
" | undefined"
],
"path": "x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "aiops",
"id": "def-public.AiopsAppDependencies.cases",
"type": "Object",
"tags": [],
"label": "cases",
"description": [],
"signature": [
{
"pluginId": "cases",
"scope": "public",
"docId": "kibCasesPluginApi",
"section": "def-public.CasesUiStart",
"text": "CasesUiStart"
},
" | undefined"
],
"path": "x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts",
"deprecated": false,
"trackAdoption": false
}
],
"initialIsOpen": false
Expand Down Expand Up @@ -895,29 +958,6 @@
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "aiops",
"id": "def-public.LogRateAnalysisContentWrapperProps.analysisType",
"type": "CompoundType",
"tags": [],
"label": "analysisType",
"description": [
"The type of analysis, whether it's a spike or dip"
],
"signature": [
{
"pluginId": "aiops",
"scope": "common",
"docId": "kibAiopsPluginApi",
"section": "def-common.LogRateAnalysisType",
"text": "LogRateAnalysisType"
},
" | undefined"
],
"path": "x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content_wrapper.tsx",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "aiops",
"id": "def-public.LogRateAnalysisContentWrapperProps.stickyHistogram",
Expand Down Expand Up @@ -1127,6 +1167,22 @@
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "aiops",
"id": "def-public.LogRateAnalysisResultsData.analysisType",
"type": "CompoundType",
"tags": [],
"label": "analysisType",
"description": [
"The type of analysis, whether it's a spike or dip"
],
"signature": [
"\"spike\" | \"dip\""
],
"path": "x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "aiops",
"id": "def-public.LogRateAnalysisResultsData.significantTerms",
Expand Down Expand Up @@ -1178,44 +1234,8 @@
}
],
"enums": [],
"misc": [
{
"parentPluginId": "aiops",
"id": "def-public.LogRateAnalysisType",
"type": "Type",
"tags": [],
"label": "LogRateAnalysisType",
"description": [
"\nUnion type of log rate analysis types."
],
"signature": [
"\"spike\" | \"dip\""
],
"path": "x-pack/plugins/aiops/common/constants.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
}
],
"objects": [
{
"parentPluginId": "aiops",
"id": "def-public.LOG_RATE_ANALYSIS_TYPE",
"type": "Object",
"tags": [],
"label": "LOG_RATE_ANALYSIS_TYPE",
"description": [
"\nThe type of log rate analysis (spike or dip) will affect how parameters are\npassed to the analysis API endpoint."
],
"signature": [
"{ readonly SPIKE: \"spike\"; readonly DIP: \"dip\"; }"
],
"path": "x-pack/plugins/aiops/common/constants.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
}
]
"misc": [],
"objects": []
},
"server": {
"classes": [],
Expand Down Expand Up @@ -1280,23 +1300,6 @@
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "aiops",
"id": "def-common.LogRateAnalysisType",
"type": "Type",
"tags": [],
"label": "LogRateAnalysisType",
"description": [
"\nUnion type of log rate analysis types."
],
"signature": [
"\"spike\" | \"dip\""
],
"path": "x-pack/plugins/aiops/common/constants.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "aiops",
"id": "def-common.PLUGIN_ID",
Expand Down
Loading

0 comments on commit c28a708

Please sign in to comment.