Skip to content

Bootstrap repository #14

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
Mar 27, 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
5 changes: 5 additions & 0 deletions .buildkite/default-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
# $yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
steps:
- label: "Build"
command: "npm install && npm run build"
20 changes: 20 additions & 0 deletions .buildkite/diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Produces a list of changed files between two commits (works for merges and
# regular commits).
# Used in conjunction with the monorepo-diff-buildkite-plugin to determine
# which pipelines to upload/trigger based on the files changed.

[ $# -lt 1 ] && { echo "argument is missing."; exit 1; }

COMMIT=$1

HEAD_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
BRANCH_POINT_COMMIT=$(git merge-base "$HEAD_BRANCH" "$COMMIT")

if [ "$BUILDKITE_BRANCH" == "$HEAD_BRANCH" ]; then
echo "diff between $COMMIT and HEAD~1"
git diff --raw HEAD~1 | awk '{print $6; if($7) {print $7}}'
else
echo "diff between $COMMIT and $BRANCH_POINT_COMMIT"
git diff --raw "$COMMIT".."$BRANCH_POINT_COMMIT" | awk '{print $6; if($7) {print $7}}'
fi
32 changes: 26 additions & 6 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
agents:
provider: "gcp"
machineType: "n1-standard-4"

---
# $yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
steps:
- label: "Test"
command: "npm install && npm test"
- label: "Triggering pipelines"
plugins:
monorepo-diff#v1.3.0:
diff: ".buildkite/diff ${BUILDKITE_COMMIT}"
wait: true
watch:
# if our Renovate configuration is amended, then make sure we have well-formed config
# for more info, see https://docs.elastic.dev/plat-prod-team/service-catalogue/renovate/testing-renovate-changes
- path: "renovate.json"
config:
label: "Verify Renovate configuration"
command: "renovate-config-validator"
agents:
image: "docker.elastic.co/ci-agent-images/pipelib:0.13.0@sha256:190464950de81cb3390bd5e07bb1cc171dd4a765c1ce5de58ebca476f9a6839f"
# if our catalog-info.yaml is changed, make sure it's well-formed according to our internal standards as well as Backstage's validation
- path: "catalog-info.yaml"
config:
command: "/agent/check-catalog-info.sh"
agents:
image: "docker.elastic.co/ci-agent-images/pipelib:0.13.0@sha256:190464950de81cb3390bd5e07bb1cc171dd4a765c1ce5de58ebca476f9a6839f"
- default:
config:
label: ":pipeline: Upload default Pipeline"
command: "buildkite-agent pipeline upload .buildkite/default-pipeline.yml"
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These owners will be the default owners for everything in
# the repo.
* @elastic/search-extract-and-transform
17 changes: 4 additions & 13 deletions catalog-info.yml → catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,26 @@ apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: buildkite-pipeline-mcp-server-elasticsearch
description: Buildkite Pipeline for Elasticsearch MCP Server
description: Buildkite Pipeline for mcp-server-elasticsearch
links:
- title: Pipeline
url: https://buildkite.com/elastic/mcp-server-elasticsearch

# ------------------------------------------------------------------------------
# this is the main pipeline, triggered via pull requests and merges

spec:
type: buildkite-pipeline
owner: group:search-eng
owner: group:search-extract-and-transform
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: elastic-mcp-server-elasticsearch
description:
name: mcp-server-elasticsearch
description:
spec:
branch_configuration: "main"
repository: elastic/mcp-server-elasticsearch
pipeline_file: ".buildkite/pipeline.yml"
provider_settings:
skip_pull_request_builds_for_existing_commits: false
teams:
search-extract-and-transform:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: READ_ONLY
search-productivity-team: {}

---