Skip to content

Commit baa10b2

Browse files
[Backport 8.16] Run Kibana type checks against active branches (#3793)
* Run Kibana type checks against active branches (#3791) (cherry picked from commit 188f20a) * Fix repository name --------- Co-authored-by: Quentin Pradet <[email protected]>
1 parent e31b7e9 commit baa10b2

File tree

3 files changed

+108
-0
lines changed

3 files changed

+108
-0
lines changed

.buildkite/kibana.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
# Since we're into the current repo, move to the top-level
6+
cd ..
7+
8+
echo "--- Clone elasticsearch-js"
9+
git clone -v -- [email protected]:elastic/elasticsearch-js.git
10+
pushd elasticsearch-js
11+
git checkout $BUILDKITE_BRANCH
12+
popd
13+
14+
echo "--- Clone Kibana"
15+
git clone -v --reference /usr/local/git-references/git-gb.xjqchip.workers.dev-elastic-kibana-git -- [email protected]:elastic/kibana.git
16+
cd kibana
17+
18+
echo "--- Install Node.js and Yarn"
19+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
20+
set +e # https://github.com/nvm-sh/nvm/issues/3117
21+
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
22+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
23+
set -e
24+
25+
nvm install
26+
nvm use
27+
npm install --global yarn
28+
29+
echo "--- Install elasticsearch-js"
30+
pushd ../elasticsearch-js
31+
npm install
32+
npm run build
33+
npm pack
34+
popd
35+
yarn add ../elasticsearch-js/elastic-elasticsearch-*.tgz
36+
37+
echo "--- Bootstrap Kibana"
38+
git --no-pager diff
39+
yarn kbn bootstrap --allow-root
40+
41+
echo "--- Check types"
42+
node scripts/type_check.js

.buildkite/kibana.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
agents:
2+
memory: "24G"
3+
cpu: "4"
4+
ephemeralStorage: 15Gi
5+
6+
7+
steps:
8+
- label: "Run Kibana type checks"
9+
command: .buildkite/kibana.sh

catalog-info.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# yaml-language-server: $schema=https://json.schemastore.org/catalog-info.json
3+
apiVersion: backstage.io/v1alpha1
4+
kind: Component
5+
metadata:
6+
name: elasticsearch-specification
7+
8+
spec:
9+
type: library
10+
owner: group:devtools-team
11+
lifecycle: beta
12+
13+
---
14+
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
15+
apiVersion: backstage.io/v1alpha1
16+
kind: Resource
17+
metadata:
18+
name: kibana-type-checks-pipeline
19+
description: Run Kibana type checks against the specification
20+
21+
spec:
22+
type: buildkite-pipeline
23+
owner: group:devtools-team
24+
system: buildkite
25+
26+
implementation:
27+
apiVersion: buildkite.elastic.dev/v1
28+
kind: Pipeline
29+
metadata:
30+
name: Kibana type checks
31+
spec:
32+
repository: elastic/elasticsearch-specification
33+
pipeline_file: .buildkite/kibana.yml
34+
provider_settings:
35+
trigger_mode: none
36+
teams:
37+
devtools-team:
38+
access_level: MANAGE_BUILD_AND_READ
39+
everyone:
40+
access_level: READ_ONLY
41+
schedules:
42+
Daily main:
43+
branch: 'main'
44+
cronline: '0 4 * * *'
45+
message: 'Daily run for main branch'
46+
Daily 8.x:
47+
branch: '8.x'
48+
cronline: '0 4 * * *'
49+
message: 'Daily run for 8.x branch'
50+
Daily 8.17:
51+
branch: '8.17'
52+
cronline: '0 4 * * *'
53+
message: 'Daily run for 8.17 branch'
54+
Daily 8.18:
55+
branch: '8.18'
56+
cronline: '0 4 * * *'
57+
message: 'Daily run for 8.18 branch'

0 commit comments

Comments
 (0)