Skip to content

Commit

Permalink
Merge branch 'main' into api-doc-suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
natasha-moore-elastic authored Jul 1, 2024
2 parents 4c58e42 + 5e002d5 commit c477add
Show file tree
Hide file tree
Showing 3,373 changed files with 111,853 additions and 46,060 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 5 additions & 2 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ enabled:
- x-pack/test/api_integration/config_security_basic.ts
- x-pack/test/api_integration/config_security_trial.ts
- x-pack/test/api_integration/apis/aiops/config.ts
- x-pack/test/api_integration/apis/asset_manager/config_when_disabled.ts
- x-pack/test/api_integration/apis/asset_manager/config_when_enabled.ts
- x-pack/test/api_integration/apis/cases/config.ts
- x-pack/test/api_integration/apis/content_management/config.ts
- x-pack/test/api_integration/apis/cloud_security_posture/config.ts
Expand Down Expand Up @@ -389,8 +387,10 @@ enabled:
- x-pack/test/security_api_integration/login_selector.config.ts
- x-pack/test/security_api_integration/oidc_implicit_flow.config.ts
- x-pack/test/security_api_integration/oidc.config.ts
- x-pack/test/security_api_integration/oidc.http2.config.ts
- x-pack/test/security_api_integration/pki.config.ts
- x-pack/test/security_api_integration/saml.config.ts
- x-pack/test/security_api_integration/saml.http2.config.ts
- x-pack/test/security_api_integration/saml_cloud.config.ts
- x-pack/test/security_api_integration/session_idle.config.ts
- x-pack/test/security_api_integration/session_invalidate.config.ts
Expand All @@ -401,6 +401,8 @@ enabled:
- x-pack/test/security_functional/login_selector.config.ts
- x-pack/test/security_functional/oidc.config.ts
- x-pack/test/security_functional/saml.config.ts
- x-pack/test/security_functional/saml.http2.config.ts
- x-pack/test/security_functional/oidc.http2.config.ts
- x-pack/test/security_functional/insecure_cluster_warning.config.ts
- x-pack/test/security_functional/user_profiles.config.ts
- x-pack/test/security_functional/expired_session.config.ts
Expand Down Expand Up @@ -451,6 +453,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/security/config.examples.ts
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.basic.ts
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless.ts
- x-pack/test_serverless/functional/test_suites/security/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/security/config.context_awareness.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
Expand Down
28 changes: 14 additions & 14 deletions .buildkite/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: bk-kibana-serverless-emergency-release-branch-testing
description: Runs testing for emergency release / hotfix branches
links:
- url: 'https://buildkite.com/elastic/kibana-serverless-emergency-release-branch-testing'
title: Pipeline link
spec:
type: buildkite-pipeline
owner: 'group:kibana-operations'
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: kibana / serverless / emergency release branch testing
description: Runs testing for emergency release / hotfix branches
spec:
env:
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-mission-control'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
allow_rebuilds: true
branch_configuration: deploy-fix@*
default_branch: main
repository: elastic/kibana
pipeline_file: .buildkite/pipelines/es_serverless/emergency_release_branch_testing.yml
skip_intermediate_builds: false
provider_settings:
build_branches: true
build_pull_requests: false
publish_commit_status: true
trigger_mode: code
build_tags: false
prefix_pull_request_fork_branch_names: false
skip_pull_request_builds_for_existing_commits: true
teams:
everyone:
access_level: BUILD_AND_READ
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
appex-qa:
access_level: MANAGE_BUILD_AND_READ
kibana-tech-leads:
access_level: MANAGE_BUILD_AND_READ
1 change: 1 addition & 0 deletions .buildkite/pipeline-resource-definitions/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-performance-data-set-extraction-daily.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-pr.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-purge-cloud-deployments.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release-testing.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/scalability_testing-daily.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-ess/security-solution-ess.yml
Expand Down
55 changes: 55 additions & 0 deletions .buildkite/pipeline-utils/agent_images.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { dump } from 'js-yaml';
import { BuildkiteClient, BuildkiteCommandStep } from './buildkite';

type AgentImageConfig = BuildkiteCommandStep['agents'];

const DEFAULT_AGENT_IMAGE_CONFIG: AgentImageConfig = {
provider: 'gcp',
image: 'family/kibana-ubuntu-2004',
imageProject: 'elastic-images-prod',
};

const FIPS_AGENT_IMAGE_CONFIG: AgentImageConfig = {
provider: 'gcp',
image: 'family/kibana-fips-ubuntu-2004',
imageProject: 'elastic-images-prod',
};

const GITHUB_PR_LABELS = process.env.GITHUB_PR_LABELS ?? '';
const FTR_ENABLE_FIPS_AGENT = process.env.FTR_ENABLE_FIPS_AGENT?.toLowerCase() === 'true';

// Narrow the return type with overloads
function getAgentImageConfig(): AgentImageConfig;
function getAgentImageConfig(options: { returnYaml: true }): string;
function getAgentImageConfig({ returnYaml = false } = {}): string | AgentImageConfig {
const bk = new BuildkiteClient();
let config: AgentImageConfig;

if (FTR_ENABLE_FIPS_AGENT || GITHUB_PR_LABELS.includes('ci:enable-fips-agent')) {
config = FIPS_AGENT_IMAGE_CONFIG;

bk.setAnnotation(
'agent image config',
'info',
'#### FIPS Agents Enabled<br />\nFIPS mode can produce new test failures. If you did not intend this remove ```KBN_ENABLE_FIPS``` environment variable and/or the ```ci:enable-fips-agent``` Github label.'
);
} else {
config = DEFAULT_AGENT_IMAGE_CONFIG;
}

if (returnYaml) {
return dump({ agents: config });
}

return config;
}

export { getAgentImageConfig };
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { BuildkiteClient, BuildkiteStep } from '../buildkite';
import { CiStatsClient, TestGroupRunOrderResponse } from './client';

import DISABLED_JEST_CONFIGS from '../../disabled_jest_configs.json';
import { getAgentImageConfig } from '#pipeline-utils';

type RunGroup = TestGroupRunOrderResponse['types'][0];

Expand All @@ -25,9 +26,7 @@ const getAgentRule = (queueName: string = 'n2-4-spot') => {
if (process.env?.BUILDKITE_AGENT_META_DATA_QUEUE === 'gobld') {
const [kind, cores, spot] = queueName.split('-');
return {
provider: 'gcp',
image: 'family/kibana-ubuntu-2004',
imageProject: 'elastic-images-prod',
...getAgentImageConfig(),
machineType: `${kind}-standard-${cores}`,
preemptible: spot === 'spot',
};
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipeline-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Side Public License, v 1.
*/

export * from './agent_images';
export * from './buildkite';
export * as CiStats from './ci-stats';
export * from './github';
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ steps:
- exit_status: '*'
limit: 1

- command: KIBANA_DOCKER_CONTEXT=chainguard .buildkite/scripts/steps/artifacts/docker_context.sh
- command: KIBANA_DOCKER_CONTEXT=wolfi .buildkite/scripts/steps/artifacts/docker_context.sh
label: 'Docker Context Verification'
agents:
image: family/kibana-ubuntu-2004
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## Triggers the artifacts container image build for emergency releases
agents:
queue: kibana-default
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2

notify:
- slack: "#kibana-mission-control"
Expand Down
13 changes: 2 additions & 11 deletions .buildkite/pipelines/es_serverless/verify_es_serverless_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SKIP_VERIFICATION: if set to 1/true, it will skip running all tests
# SKIP_CYPRESS: if set to 1/true, it will skip running the cypress tests
# FTR_EXTRA_ARGS: a string argument, if passed, it will be forwarded verbatim to the FTR run script
# ES_SERVERLESS_IMAGE: the tag for the docker image to test, in the form of docker.elastic.co/elasticsearch-ci/elasticsearch-serverless:$TAG
# ES_SERVERLESS_IMAGE: the full image path for the docker image to test
# BUILDKITE_COMMIT: the commit hash of the kibana branch to test

agents:
Expand All @@ -16,16 +16,7 @@ agents:

steps:
- label: "Annotate runtime parameters"
command: |
buildkite-agent annotate --context kibana-commit --style info "Kibana build hash: $BUILDKITE_BRANCH / $BUILDKITE_COMMIT"
cat << EOF | buildkite-agent annotate --context es-serverless-image --style info
ES Serverless image: \`$ES_SERVERLESS_IMAGE\`
To run this locally:
\`\`\`
node scripts/es serverless --image $ES_SERVERLESS_IMAGE
\`\`\`
EOF
command: .buildkite/scripts/steps/es_serverless/annotate_runtime_parameters.sh

- group: "(:kibana: x :elastic:) Trigger Kibana Serverless suite"
if: "build.env('SKIP_VERIFICATION') != '1' && build.env('SKIP_VERIFICATION') != 'true'"
Expand Down
61 changes: 46 additions & 15 deletions .buildkite/pipelines/fips.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,63 @@
env:
DISABLE_CI_STATS_SHIPPING: "true"
DISABLE_CI_STATS_SHIPPING: 'true'
KBN_ENABLE_FIPS: 'true'
TEST_BROWSER_HEADLESS: 1
agents:
provider: 'gcp'
image: 'family/kibana-fips-ubuntu-2004'
imageProject: 'elastic-images-prod'
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
key: pre-build
timeout_in_minutes: 10
agents:
machineType: n2-standard-2

- wait

- command: .buildkite/scripts/steps/build_kibana.sh
label: Build Kibana Distribution and Plugins
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-16
preemptible: true
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
depends_on: pre-build
timeout_in_minutes: 60
retry:
automatic:
- exit_status: "-1"
- exit_status: '-1'
limit: 3

- wait

- command: TEST_PACKAGE=fips .buildkite/scripts/steps/package_testing/test.sh
label: "Smoke testing for FIPS"
- command: .buildkite/scripts/steps/checks/verify_fips_enabled.sh
label: 'Verify FIPS Enabled'
depends_on: build
timeout_in_minutes: 10
agents:
machineType: n2-standard-2
preemptible: true

- command: .buildkite/scripts/steps/fips/smoke_test.sh
label: 'Pick Smoke Test Group Run Order'
depends_on: build
timeout_in_minutes: 10
env:
FTR_CONFIGS_SCRIPT: '.buildkite/scripts/steps/test/ftr_configs.sh'
FTR_EXTRA_ARGS: '$FTR_EXTRA_ARGS'
LIMIT_CONFIG_TYPE: 'functional'
retry:
automatic:
- exit_status: '*'
limit: 1

- wait: ~
continue_on_failure: true

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
enableNestedVirtualization: true
localSsds: 1
localSsdInterface: nvme
machineType: n2-standard-4
timeout_in_minutes: 600
machineType: n2-standard-2
3 changes: 0 additions & 3 deletions .buildkite/pipelines/pull_request/apm_cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ steps:
- command: .buildkite/scripts/steps/functional/apm_cypress.sh
label: 'APM Cypress Tests'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
depends_on:
Expand Down
Loading

0 comments on commit c477add

Please sign in to comment.