forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/nodemailer-6.9.9
* master: (1654 commits) Bump ejs from 3.1.9 to 3.1.10 Don't render exceptions flyout if data is loading (elastic#181588) Enable value list modal (elastic#181593) skip flaky suite (elastic#181777) skip failing test suite (elastic#182263) [Mappings Editor] Disable _source field in serverless (elastic#181712) [data.search] Fix unhandled promise rejections (elastic#181785) [Fleet] Fix logic for detecting first time Elastic Agent users (elastic#182214) [ML] Decouple data_visualizer from MapEmbeddable (elastic#181928) [ES|QL] Sorting accepts expressions (elastic#181916) [ML] Single Metric Viewer: ensures chart displays correctly when opening from a job annotation (elastic#182176) Adding optional Description field to Roles APIs (elastic#182039) Upgrade Markdown-it to 14.1.0 (elastic#182244) Bump xml-crypto from 5.0.0 to 6.0.0 [DOCS] Fix docs and screenshots for rule creation changes (elastic#181925) Update dependency elastic-apm-node to ^4.5.3 (main) (elastic#182236) [Obs AI Assistant] register alert details context in observability plugin (elastic#181501) Add `@typescript-eslint/no-floating-promises` (elastic#181456) [Playground] Propagate Error message into FE (elastic#182201) [ES|QL] Rename the setting to a more generic one and move to the general section (elastic#182074) ...
- Loading branch information
Showing
15,107 changed files
with
622,900 additions
and
310,517 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
.buildkite/pipeline-resource-definitions/_template/template.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
### | ||
# For more information on authoring pipeline definitions, | ||
# follow the guides at https://docs.elastic.dev/ci/getting-started-with-buildkite-at-elastic | ||
### | ||
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Resource | ||
metadata: | ||
# This will be the URL slug in Backstage UI as: | ||
# https://backstage.elastic.dev/catalog/default/resource/bk-kibana-your-pipeline-name | ||
# bk-pipeline-<pipeline-name-slugified> | ||
name: bk-kibana-your-pipeline-name | ||
# This will be displayed in the Backstage UI | ||
description: '<Describe your pipeline here>' | ||
links: | ||
# These are relevant links to your pipeline that will be listed in the Backstage UI | ||
# The URL slug here is the .spec.implementation.metadata.name field slugified | ||
- url: 'https://buildkite.com/elastic/kibana-your-pipeline-name' | ||
title: Pipeline link | ||
spec: | ||
type: buildkite-pipeline | ||
system: buildkite | ||
# The owner team's github group name in the format 'group:<github-group-name>' | ||
owner: 'group:github-group-name' | ||
implementation: | ||
apiVersion: buildkite.elastic.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
# <context / pipeline name> - this will be displayed in the Buildkite UI as title | ||
# and this will be slugified to form the URL in the Backstage UI | ||
name: kibana / your pipeline name | ||
# This will appear as description on the Buildkite UI | ||
description: '<Describe your pipeline here>' | ||
spec: | ||
# Environment variables that will be set for the pipeline | ||
env: | ||
# Slack channel to send notifications to, if ELASTIC_SLACK_NOTIFICATIONS_ENABLED = 'true' | ||
SLACK_NOTIFICATIONS_CHANNEL: '#team-slack-channel-name' | ||
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' | ||
|
||
allow_rebuilds: false | ||
branch_configuration: main | ||
default_branch: main | ||
repository: elastic/kibana | ||
# Point to a pipeline implementation, detailing the pipeline steps to run | ||
pipeline_file: .buildkite/pipelines/your-pipeline-name.yml | ||
skip_intermediate_builds: false | ||
provider_settings: | ||
prefix_pull_request_fork_branch_names: false | ||
skip_pull_request_builds_for_existing_commits: true | ||
trigger_mode: none | ||
# Teams and their access levels to the pipeline, | ||
# please keep [kibana-operations, appex-qa, kibana-tech-leads] as MANAGE_BUILD_AND_READ | ||
# and [everyone] as BUILD_AND_READ | ||
teams: | ||
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 | ||
everyone: | ||
access_level: BUILD_AND_READ | ||
# Scheduled runs for the pipeline | ||
schedules: | ||
Daily 6 am UTC: | ||
cronline: 0 5 * * * | ||
message: Daily 6 am UTC | ||
branch: main | ||
# Optionally, set schedule-specific env-vars here | ||
env: | ||
SCHEDULED: 'true' |
68 changes: 68 additions & 0 deletions
68
.buildkite/pipeline-resource-definitions/fix-location-collection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env ts-node-script | ||
/* | ||
* 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 fs from 'fs'; | ||
import jsYaml from 'js-yaml'; | ||
import path from 'path'; | ||
import { execSync } from 'child_process'; | ||
|
||
const EXCLUDE_LIST = ['locations.yml', '_template/template.yml']; | ||
const REPO_FILES_BASE = 'https://github.com/elastic/kibana/blob/main'; | ||
|
||
type BackstageLocationResource = object & { | ||
spec: { targets: string[] }; | ||
}; | ||
|
||
async function main() { | ||
const repoRoot = execSync('git rev-parse --show-toplevel').toString().trim(); | ||
const resourceDefinitionsFolder = path.resolve( | ||
repoRoot, | ||
'.buildkite', | ||
'pipeline-resource-definitions' | ||
); | ||
const resourceDefinitionsBaseUrl = `${REPO_FILES_BASE}/.buildkite/pipeline-resource-definitions`; | ||
const locationFile = path.resolve(resourceDefinitionsFolder, 'locations.yml'); | ||
const locationFileLines = fs.readFileSync(locationFile, 'utf8').split('\n'); | ||
|
||
const pipelines = readDirRecursively(resourceDefinitionsFolder) | ||
.filter((file) => file.endsWith('.yml')) | ||
.map((file) => file.replace(`${resourceDefinitionsFolder}/`, '')) | ||
.filter((f) => !EXCLUDE_LIST.includes(f)); | ||
|
||
const preamble = locationFileLines.slice(0, 1); | ||
|
||
const locationObj = jsYaml.load( | ||
locationFileLines.slice(1).join('\n') | ||
) as BackstageLocationResource; | ||
locationObj.spec.targets = pipelines.map( | ||
(fileName) => `${resourceDefinitionsBaseUrl}/${fileName}` | ||
); | ||
|
||
const locationYaml = jsYaml.dump(locationObj, { lineWidth: 400 }); | ||
|
||
fs.writeFileSync(locationFile, `${preamble.join('\n')}\n${locationYaml}`); | ||
|
||
console.log('Updated locations.yml'); | ||
} | ||
|
||
function readDirRecursively(dir: string): string[] { | ||
const files = fs.readdirSync(dir); | ||
return files.reduce((acc, file) => { | ||
const filePath = path.join(dir, file); | ||
if (fs.statSync(filePath).isDirectory()) { | ||
return [...acc, ...readDirRecursively(filePath)]; | ||
} else { | ||
return [...acc, filePath]; | ||
} | ||
}, [] as string[]); | ||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
Oops, something went wrong.