Skip to content

Commit

Permalink
Merge branch 'main' into fix/163971-2
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Aug 25, 2023
2 parents efe51a5 + 76ac34a commit 559a68d
Show file tree
Hide file tree
Showing 2,541 changed files with 78,574 additions and 58,695 deletions.
10 changes: 9 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ disabled:
- x-pack/plugins/observability_onboarding/e2e/ftr_config_runner.ts
- x-pack/plugins/observability_onboarding/e2e/ftr_config.ts
- x-pack/test/osquery_cypress/cli_config.ts
- x-pack/test/osquery_cypress/serverless_cli_config.ts
- x-pack/test/osquery_cypress/config.ts
- x-pack/test/osquery_cypress/visual_config.ts
- x-pack/test/security_solution_cypress/cli_config.ts
Expand Down Expand Up @@ -81,12 +82,18 @@ disabled:
# 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/observability/config.feature_flags.ts
- x-pack/test_serverless/api_integration/test_suites/search/config.ts
- x-pack/test_serverless/api_integration/test_suites/search/config.feature_flags.ts
- x-pack/test_serverless/api_integration/test_suites/security/config.ts
- x-pack/test_serverless/api_integration/test_suites/security/config.feature_flags.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/observability/config.feature_flags.ts
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts
- x-pack/test_serverless/functional/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts

defaultQueue: 'n2-4-spot'
enabled:
Expand Down Expand Up @@ -259,6 +266,7 @@ enabled:
- x-pack/test/functional_with_es_ssl/apps/cases/group2/config.ts
- x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/config.ts
- x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/config.ts
- x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/shared/config.ts
- x-pack/test/functional/apps/advanced_settings/config.ts
- x-pack/test/functional/apps/aiops/config.ts
- x-pack/test/functional/apps/api_keys/config.ts
Expand Down Expand Up @@ -347,7 +355,6 @@ enabled:
- x-pack/test/reporting_functional/reporting_and_deprecated_security.config.ts
- x-pack/test/reporting_functional/reporting_and_security.config.ts
- x-pack/test/reporting_functional/reporting_without_security.config.ts
- x-pack/test/reporting_functional/reporting_and_timeout.config.ts
- x-pack/test/rule_registry/security_and_spaces/config_basic.ts
- x-pack/test/rule_registry/security_and_spaces/config_trial.ts
- x-pack/test/rule_registry/spaces_only/config_basic.ts
Expand Down Expand Up @@ -412,6 +419,7 @@ enabled:
- x-pack/performance/journeys/ecommerce_dashboard_saved_search_only.ts
- x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts
- x-pack/performance/journeys/dashboard_listing_page.ts
- x-pack/performance/journeys/tags_listing_page.ts
- x-pack/performance/journeys/cloud_security_dashboard.ts
- x-pack/performance/journeys/apm_service_inventory.ts
- x-pack/test/custom_branding/config.ts
Expand Down
18 changes: 4 additions & 14 deletions .buildkite/pipelines/on_merge_unsupported_ftrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,21 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
parallelism: 14
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

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

Expand All @@ -86,11 +82,9 @@ steps:
parallelism: 2
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/defend_workflows.sh
label: 'Defend Workflows Cypress Tests'
agents:
Expand All @@ -100,8 +94,6 @@ steps:
parallelism: 2
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
Expand All @@ -116,8 +108,6 @@ steps:
parallelism: 6
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 10
parallelism: 16
soft_fail: true
retry:
automatic:
Expand Down Expand Up @@ -130,7 +130,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 4
parallelism: 6
soft_fail: true
retry:
automatic:
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pipelines/pull_request/defend_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ steps:
- command: .buildkite/scripts/steps/functional/defend_workflows_vagrant.sh
label: 'Defend Workflows Endpoint Cypress Tests'
agents:
queue: n2-16-virt
queue: n2-4-virt
depends_on: build
timeout_in_minutes: 120
parallelism: 6
parallelism: 5
retry:
automatic:
- exit_status: '*'
Expand Down
16 changes: 16 additions & 0 deletions .buildkite/pipelines/pull_request/osquery_cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,21 @@ steps:
depends_on: build
timeout_in_minutes: 50
soft_fail: true
retry:
automatic: false
artifact_paths:
- "target/kibana-osquery/**/*"

- 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:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-osquery/**/*"
8 changes: 5 additions & 3 deletions .buildkite/pipelines/pull_request/security_solution.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: 60
parallelism: 10
parallelism: 16
retry:
automatic:
- exit_status: '*'
Expand All @@ -19,7 +19,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 60
parallelism: 2
parallelism: 4
retry:
automatic:
- exit_status: '*'
Expand All @@ -33,7 +33,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 4
parallelism: 6
retry:
automatic:
- exit_status: '*'
Expand All @@ -48,6 +48,8 @@ steps:
depends_on: build
timeout_in_minutes: 120
parallelism: 1
retry:
automatic: false
soft_fail: true
artifact_paths:
- "target/kibana-security-solution/**/*"
10 changes: 10 additions & 0 deletions .buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
env:
ENVIRONMENT: ${ENVIRONMENT?}

steps:
- label: ":pipeline::grey_question::seedling: Trigger Kibana Tests for ${ENVIRONMENT}"
env:
QG_PIPELINE_LOCATION: ".buildkite/pipelines/quality-gates"
command: "make -C /agent run-environment-tests"
agents:
image: "docker.elastic.co/ci-agent-images/quality-gate-seedling:0.0.2"
10 changes: 10 additions & 0 deletions .buildkite/pipelines/quality-gates/pipeline.tests-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
steps:
- label: ":pipeline::fleet::seedling: Trigger Observability Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Observability specific Kibana tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"

- label: ":pipeline::lock::seedling: Trigger Security Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Security specific Kibana tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
20 changes: 20 additions & 0 deletions .buildkite/pipelines/quality-gates/pipeline.tests-qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
steps:
- label: ":pipeline::kibana::seedling: Trigger Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Kibana specific tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"

- label: ":pipeline::fleet::seedling: Trigger Fleet Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Fleet specific Kibana tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"

- label: ":pipeline::lock::seedling: Trigger Security Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Security specific Kibana tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"

- label: ":pipeline::lock::seedling: Trigger Control Plane Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Control Plane specific Kibana tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
10 changes: 10 additions & 0 deletions .buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
steps:
- label: ":pipeline::fleet::seedling: Trigger Observability Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Observability specific Kibana tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"

- label: ":pipeline::lock::seedling: Trigger Security Kibana Tests for ${ENVIRONMENT}"
command: echo "replace me with Security specific Kibana tests"
agent:
image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
34 changes: 3 additions & 31 deletions .buildkite/pipelines/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,35 +66,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 12
retry:
automatic:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-serverless/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless.sh
label: 'Explore - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 12
retry:
automatic:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-serverless/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless.sh
label: 'Serverless Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 12
parallelism: 16
retry:
automatic:
- exit_status: '*'
Expand All @@ -103,7 +75,7 @@ steps:
- "target/kibana-security-serverless/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Explore - Security Solution Cypress Tests'
label: 'Serverless Explore - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
Expand All @@ -117,7 +89,7 @@ steps:
- "target/kibana-security-serverless/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Investigations - Security Solution Cypress Tests'
label: 'Serverless Investigations - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
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 @@ -10,6 +10,7 @@ import { execSync } from 'child_process';
import fs from 'fs';
import prConfigs from '../../../pull_requests.json';
import { areChangesSkippable, doAnyChangesMatch } from '#pipeline-utils';

const prConfig = prConfigs.jobs.find((job) => job.pipelineSlug === 'kibana-pull-request');

if (!prConfig) {
Expand Down
16 changes: 8 additions & 8 deletions .buildkite/scripts/steps/add_gh_labels_to_bk_metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ const fetchLabels = (prNumber: PrNumber) =>

try {
const labels = pipe(head, firstMatch, parseInt10, fetchLabels)(`${process.env[parseTarget]}`);
execSync(`buildkite-agent meta-data set gh_labels ${labels}`);
if (alsoAnnotate)
execSync(
`buildkite-agent annotate --context 'default' --style 'info' "Github Labels: ${labels}"`
);
if (labels) {
execSync(`buildkite-agent meta-data set gh_labels ${labels}`);
if (alsoAnnotate)
execSync(
`buildkite-agent annotate --context 'default' --style 'info' "Github Labels: ${labels}"`
);
}
} catch (e) {
console.error(
`\n!!! Error fetching Github Labels (stringified): \n${JSON.stringify(e, null, 2)}`
);
console.error(`Error fetching Github Labels for issue ${firstMatch}`);
}

export {};
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/apm_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GH_APM_TEAM_LABEL="Team:APM"
if (! is_pr); then
echo "--- Add GH labels to buildkite metadata"
ts-node .buildkite/scripts/steps/add_gh_labels_to_bk_metadata.ts BUILDKITE_MESSAGE true
GH_ON_MERGE_LABELS="$(buildkite-agent meta-data get gh_labels)"
GH_ON_MERGE_LABELS="$(buildkite-agent meta-data get gh_labels --default '')"
fi

# Enabling cypress dashboard recording when PR is labeled with `apm:cypress-record` and we are not using the flaky test runner OR on merge with Team:APM label applied
Expand Down
4 changes: 3 additions & 1 deletion .buildkite/scripts/steps/functional/defend_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Defend Workflows Cypress tests"

yarn --cwd x-pack/plugins/security_solution cypress:dw:run
cd x-pack/plugins/security_solution

yarn cypress:dw:run; status=$?; yarn junit:merge && exit $status
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ source .buildkite/scripts/steps/functional/common_cypress.sh
export JOB=kibana-defend-workflows-endpoint-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}


echo "--- Defend Workflows Endpoint Cypress tests"

yarn --cwd x-pack/plugins/security_solution cypress:dw:endpoint:run
cd x-pack/plugins/security_solution

yarn cypress:dw:endpoint:run; status=$?; yarn junit:merge && exit $status
4 changes: 3 additions & 1 deletion .buildkite/scripts/steps/functional/response_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

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

yarn --cwd x-pack/test/security_solution_cypress cypress:run:respops:ess
cd x-pack/test/security_solution_cypress

yarn cypress:run:respops:ess; status=$?; yarn junit:merge && exit $status
4 changes: 3 additions & 1 deletion .buildkite/scripts/steps/functional/response_ops_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

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

yarn --cwd x-pack/test/security_solution_cypress cypress:run:cases:ess
cd x-pack/test/security_solution_cypress

yarn cypress:run:cases:ess; status=$?; yarn junit:merge && exit $status
4 changes: 3 additions & 1 deletion .buildkite/scripts/steps/functional/security_serverless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Security Serverless Cypress Tests"

yarn --cwd x-pack/test/security_solution_cypress cypress:run:serverless
cd x-pack/test/security_solution_cypress

yarn cypress:run:serverless; status=$?; yarn junit:merge && exit $status
Loading

0 comments on commit 559a68d

Please sign in to comment.