Skip to content

Commit

Permalink
Merge branch 'main' into output-secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Oct 24, 2023
2 parents dff059d + a1955d7 commit 659eecb
Show file tree
Hide file tree
Showing 1,961 changed files with 52,421 additions and 40,941 deletions.
19 changes: 12 additions & 7 deletions .buildkite/ftr_configs.yml
Expand Up @@ -223,14 +223,9 @@ enabled:
- x-pack/test/cloud_security_posture_api/config.ts
- x-pack/test/detection_engine_api_integration/basic/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group1/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group2/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group3/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group4/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group5/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group6/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group7/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group8/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group9/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group10/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/prebuilt_rules/config.ts
Expand Down Expand Up @@ -451,8 +446,18 @@ enabled:
- x-pack/performance/journeys/apm_service_inventory.ts
- x-pack/test/custom_branding/config.ts
- x-pack/test/profiling_api_integration/cloud/config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/ess.config.ts

- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/workflows/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/workflows/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/operators_data_types/date_numeric_types/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/operators_data_types/date_numeric_types/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/operators_data_types/keyword_text_long/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/operators_data_types/keyword_text_long/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/operators_data_types/ips_text_array/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/exceptions/operators_data_types/ips_text_array/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/configs/ess.config.ts




Expand Down
Expand Up @@ -89,7 +89,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 60
parallelism: 4
parallelism: 8
retry:
automatic:
- exit_status: '*'
Expand Down
14 changes: 13 additions & 1 deletion .buildkite/pipelines/on_merge.yml
Expand Up @@ -109,7 +109,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 60
parallelism: 4
parallelism: 8
retry:
automatic:
- exit_status: '*'
Expand Down Expand Up @@ -187,6 +187,18 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/osquery_cypress.sh
label: 'Osquery Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 50
parallelism: 6
retry:
automatic:
- exit_status: '*'
limit: 1

- command: '.buildkite/scripts/steps/functional/on_merge_unsupported_ftrs.sh'
label: Trigger unsupported ftr tests
timeout_in_minutes: 10
Expand Down
14 changes: 0 additions & 14 deletions .buildkite/pipelines/on_merge_unsupported_ftrs.yml
Expand Up @@ -27,7 +27,6 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
retry:
automatic:
- exit_status: '-1'
Expand All @@ -41,7 +40,6 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
retry:
automatic:
- exit_status: '-1'
Expand All @@ -63,15 +61,3 @@ steps:
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/osquery_cypress.sh
label: 'Osquery Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 50
parallelism: 6
retry:
automatic:
- exit_status: '*'
limit: 1
49 changes: 20 additions & 29 deletions .buildkite/pipelines/pull_request/base.yml
Expand Up @@ -87,7 +87,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 60
parallelism: 4
parallelism: 8
retry:
automatic:
- exit_status: '*'
Expand Down Expand Up @@ -141,17 +141,6 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/defend_workflows_burn.sh
label: 'Defend Workflows Cypress Tests, burning changed specs'
agents:
queue: n2-4-virt
depends_on: build
timeout_in_minutes: 60
soft_fail: true
parallelism: 1
retry:
automatic: false

- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
label: 'Defend Workflows Cypress Tests on Serverless'
agents:
Expand All @@ -164,17 +153,6 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/defend_workflows_serverless_burn.sh
label: 'Defend Workflows Cypress Tests on Serverless, burning changed specs'
agents:
queue: n2-4-virt
depends_on: build
timeout_in_minutes: 60
soft_fail: true
parallelism: 1
retry:
automatic: false

- command: .buildkite/scripts/steps/functional/threat_intelligence.sh
label: 'Threat Intelligence Cypress Tests'
agents:
Expand All @@ -187,16 +165,29 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/security_solution_burn.sh
label: 'Security Solution Cypress tests, burning changed specs'
- command: .buildkite/scripts/steps/functional/osquery_cypress.sh
label: 'Osquery Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 60
parallelism: 1
timeout_in_minutes: 50
parallelism: 6
retry:
automatic:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh
label: 'Serverless Osquery Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 50
parallelism: 6
retry:
automatic: false
soft_fail: true
automatic:
- exit_status: '*'
limit: 1

# status_exception: Native role management is not enabled in this Elasticsearch instance
# - command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh
Expand Down
43 changes: 43 additions & 0 deletions .buildkite/pipelines/pull_request/cypress_burn.yml
@@ -0,0 +1,43 @@
steps:
- command: .buildkite/scripts/steps/functional/defend_workflows_burn.sh
label: 'Defend Workflows Cypress Tests, burning changed specs'
agents:
queue: n2-4-virt
depends_on: build
timeout_in_minutes: 60
soft_fail: true
parallelism: 1
retry:
automatic: false

- command: .buildkite/scripts/steps/functional/defend_workflows_serverless_burn.sh
label: 'Defend Workflows Cypress Tests on Serverless, burning changed specs'
agents:
queue: n2-4-virt
depends_on: build
timeout_in_minutes: 60
soft_fail: true
parallelism: 1
retry:
automatic: false

- 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: 60
parallelism: 1
retry:
automatic: false
soft_fail: true

- command: .buildkite/scripts/steps/functional/osquery_cypress_burn.sh
label: 'Osquery Cypress Tests, burning changed specs'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 50
soft_fail: true
retry:
automatic: false
40 changes: 0 additions & 40 deletions .buildkite/pipelines/pull_request/osquery_cypress.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .buildkite/pull_requests.json
Expand Up @@ -55,7 +55,7 @@
"repoName": "kibana",
"pipelineSlug": "kibana-kme-test",

"enabled": true,
"enabled": false,
"allow_org_users": true,
"allowed_repo_permissions": ["admin", "write"],
"allowed_list": ["barlowm", "renovate[bot]"],
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/lifecycle/post_command.sh
Expand Up @@ -14,6 +14,7 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
buildkite-agent artifact upload 'target/kibana-coverage/functional/**/*'
buildkite-agent artifact upload 'target/kibana-*'
buildkite-agent artifact upload 'target/kibana-security-solution/**/*.png'
buildkite-agent artifact upload 'target/kibana-osquery/**/*.png'
buildkite-agent artifact upload 'target/kibana-fleet/**/*.png'
buildkite-agent artifact upload 'target/test-metrics/*'
buildkite-agent artifact upload 'target/test-suites-ci-plan.json'
Expand Down
15 changes: 7 additions & 8 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Expand Up @@ -151,14 +151,6 @@ const uploadPipeline = (pipelineContent: string | object) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml'));
}

if (
((await doAnyChangesMatch([/^x-pack\/plugins\/osquery/, /^x-pack\/test\/osquery_cypress/])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')) &&
!GITHUB_PR_LABELS.includes('ci:skip-cypress-osquery')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/osquery_cypress.yml'));
}

if (
(await doAnyChangesMatch([
/\.docnav\.json$/,
Expand All @@ -172,6 +164,13 @@ const uploadPipeline = (pipelineContent: string | object) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/check_next_docs.yml'));
}

if (
GITHUB_PR_LABELS.includes('ci:cypress-burn') ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/cypress_burn.yml'));
}

pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));

// remove duplicated steps
Expand Down
17 changes: 12 additions & 5 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Expand Up @@ -13,7 +13,8 @@ else
KIBANA_IMAGE_TAG="pr-$BUILDKITE_PULL_REQUEST-$GIT_ABBREV_COMMIT"
fi

KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless:$KIBANA_IMAGE_TAG"
KIBANA_BASE_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless"
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
Expand Down Expand Up @@ -51,14 +52,21 @@ echo "--- Push images"
docker image push "$KIBANA_IMAGE-arm64"
docker image push "$KIBANA_IMAGE-amd64"

echo "--- Create manifest"
echo "--- Create and push manifests"
docker manifest create \
"$KIBANA_IMAGE" \
--amend "$KIBANA_IMAGE-arm64" \
--amend "$KIBANA_IMAGE-amd64"

echo "--- Push manifest"
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
Expand Down Expand Up @@ -96,7 +104,6 @@ if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_RE
cat << EOF | buildkite-agent pipeline upload
steps:
- label: ":argo: Update kibana image tag for kibana-controller using gpctl"
async: true
branches: main
trigger: gpctl-promote-with-e2e-tests
build:
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/checks.sh
Expand Up @@ -23,3 +23,4 @@ export DISABLE_BOOTSTRAP_VALIDATION=false
.buildkite/scripts/steps/checks/ftr_configs.sh
.buildkite/scripts/steps/checks/saved_objects_compat_changes.sh
.buildkite/scripts/steps/code_generation/security_solution_codegen.sh
.buildkite/scripts/steps/checks/yarn_deduplicate.sh
10 changes: 10 additions & 0 deletions .buildkite/scripts/steps/checks/yarn_deduplicate.sh
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

echo "--- Check yarn.lock for duplicated modules"
node scripts/yarn_deduplicate

check_for_changed_files 'node scripts/yarn_deduplicate && yarn kbn bootstrap' false

0 comments on commit 659eecb

Please sign in to comment.