Skip to content

[Backport 8.17] Run Kibana type checks against active branches #3794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .buildkite/kibana.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash

set -euo pipefail

# Since we're into the current repo, move to the top-level
cd ..

echo "--- Clone elasticsearch-js"
git clone -v -- [email protected]:elastic/elasticsearch-js.git
pushd elasticsearch-js
git checkout $BUILDKITE_BRANCH
popd

echo "--- Clone Kibana"
git clone -v --reference /usr/local/git-references/git-gb.xjqchip.workers.dev-elastic-kibana-git -- [email protected]:elastic/kibana.git
cd kibana

echo "--- Install Node.js and Yarn"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
set +e # https://github.com/nvm-sh/nvm/issues/3117
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
set -e

nvm install
nvm use
npm install --global yarn

echo "--- Install elasticsearch-js"
pushd ../elasticsearch-js
npm install
npm run build
npm pack
popd
yarn add ../elasticsearch-js/elastic-elasticsearch-*.tgz

echo "--- Bootstrap Kibana"
git --no-pager diff
yarn kbn bootstrap --allow-root

echo "--- Check types"
node scripts/type_check.js
9 changes: 9 additions & 0 deletions .buildkite/kibana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
agents:
memory: "24G"
cpu: "4"
ephemeralStorage: 15Gi


steps:
- label: "Run Kibana type checks"
command: .buildkite/kibana.sh
57 changes: 57 additions & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/catalog-info.json
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: elasticsearch-specification

spec:
type: library
owner: group:devtools-team
lifecycle: beta

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: kibana-type-checks-pipeline
description: Run Kibana type checks against the specification

spec:
type: buildkite-pipeline
owner: group:devtools-team
system: buildkite

implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: Kibana type checks
spec:
repository: elastic/elasticsearch-specification
pipeline_file: .buildkite/kibana.yml
provider_settings:
trigger_mode: none
teams:
devtools-team:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: READ_ONLY
schedules:
Daily main:
branch: 'main'
cronline: '0 4 * * *'
message: 'Daily run for main branch'
Daily 8.x:
branch: '8.x'
cronline: '0 4 * * *'
message: 'Daily run for 8.x branch'
Daily 8.17:
branch: '8.17'
cronline: '0 4 * * *'
message: 'Daily run for 8.17 branch'
Daily 8.18:
branch: '8.18'
cronline: '0 4 * * *'
message: 'Daily run for 8.18 branch'