Skip to content

Commit 862dc9c

Browse files
committed
Port buildkite pipelines from the main branch
1 parent 0cc4d1f commit 862dc9c

File tree

7 files changed

+76
-8
lines changed

7 files changed

+76
-8
lines changed

.buildkite/default-pipeline.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# $yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
33
steps:
44
- label: "Check License"
5-
6-
command: "cd npm-package && npm install && npm run license-checker && npm run license-header"
5+
command: "npm install && npm run license-checker && npm run license-header"
76

87
- label: "Build"
9-
command: "cd npm-package && npm install && npm run build"
8+
command: "npm install && npm run build"

.buildkite/docker-push.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
version_tag=$(awk -F ' = ' '$1 ~ /version/ { gsub(/[\"]/, "", $2); printf("%s",$2) }' Cargo.toml)
6+
elastic_image="docker.elastic.co/mcp/elasticsearch"
7+
8+
# build image
9+
docker buildx create --use --name builder
10+
docker buildx inspect --bootstrap
11+
docker buildx build -t "$elastic_image:$version_tag" --platform linux/amd64,linux/arm64 --builder builder --load .
12+
docker tag "$elastic_image:$version_tag" "$elastic_image:latest"
13+
14+
# push to docker.elastic.co
15+
ELASTIC_PASSWORD=$(vault read -field=password secret/ci/elastic-mcp-server-elasticsearch/devtoolsmachine)
16+
docker login -u "devtoolsmachine" -p "$ELASTIC_PASSWORD" docker.elastic.co
17+
docker push "$elastic_image:$version_tag"
18+
docker push "$elastic_image:latest"
19+
docker logout docker.elastic.co

.buildkite/docker.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# $yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
3+
steps:
4+
- label: "Build and publish Docker image"
5+
command: "./.buildkite/docker-push.sh"
6+
agents:
7+
provider: "gcp"

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ steps:
1414
label: "Verify Renovate configuration"
1515
command: "renovate-config-validator"
1616
agents:
17-
image: "docker.elastic.co/ci-agent-images/pipelib:0.13.0@sha256:190464950de81cb3390bd5e07bb1cc171dd4a765c1ce5de58ebca476f9a6839f"
17+
image: "docker.elastic.co/ci-agent-images/pipelib:0.15.0@sha256:753c420cf254a7ed0be658ab153965e0708fe0636dfe2fe57e6e4ae0972bb681"
1818
# if our catalog-info.yaml is changed, make sure it's well-formed according to our internal standards as well as Backstage's validation
1919
- path: "catalog-info.yaml"
2020
config:
2121
command: "/agent/check-catalog-info.sh"
2222
agents:
23-
image: "docker.elastic.co/ci-agent-images/pipelib:0.13.0@sha256:190464950de81cb3390bd5e07bb1cc171dd4a765c1ce5de58ebca476f9a6839f"
23+
image: "docker.elastic.co/ci-agent-images/pipelib:0.15.0@sha256:753c420cf254a7ed0be658ab153965e0708fe0636dfe2fe57e6e4ae0972bb681"
2424
- default:
2525
config:
2626
label: ":pipeline: Upload default Pipeline"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "elasticsearch-core-mcp-server"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2024"
55
authors = ["Elastic.co"]
66
license-file = "LICENSE"

catalog-info.yaml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
# Declare your Buildkite pipelines below
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: mcp-server-elasticsearch
7+
spec:
8+
type: library
9+
owner: group:devtools-team
10+
lifecycle: beta
11+
212
---
313
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
414
apiVersion: backstage.io/v1alpha1
@@ -30,3 +40,36 @@ spec:
3040
access_level: MANAGE_BUILD_AND_READ
3141
everyone:
3242
access_level: READ_ONLY
43+
44+
---
45+
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
46+
apiVersion: backstage.io/v1alpha1
47+
kind: Resource
48+
metadata:
49+
name: mcp-server-elasticsearch-docker
50+
description: Build and publish Docker images for mcp-server-elasticsearch
51+
spec:
52+
type: buildkite-pipeline
53+
owner: group:devtools-team
54+
system: buildkite
55+
implementation:
56+
apiVersion: buildkite.elastic.dev/v1
57+
kind: Pipeline
58+
metadata:
59+
name: mcp-server-elasticsearch-docker
60+
description: Build and publish Docker images for mcp-server-elasticsearch
61+
spec:
62+
repository: elastic/mcp-server-elasticsearch
63+
pipeline_file: ".buildkite/docker.yml"
64+
teams:
65+
search-extract-and-transform:
66+
access_level: MANAGE_BUILD_AND_READ
67+
devtools-team:
68+
access_level: MANAGE_BUILD_AND_READ
69+
everyone:
70+
access_level: READ_ONLY
71+
provider_settings:
72+
build_pull_requests: false
73+
build_branches: false
74+
build_tags: true
75+
cancel_intermediate_builds: true

0 commit comments

Comments
 (0)