Skip to content

Commit

Permalink
Merge branch 'main' into script_field_serialization_validation2
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Oct 19, 2023
2 parents f085af8 + eb8b752 commit 7e7b739
Show file tree
Hide file tree
Showing 10,414 changed files with 464,627 additions and 109,534 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .backportrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"upstream" : "elastic/elasticsearch",
"targetBranchChoices" : [ "main", "8.8", "8.7", "8.6", "8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.17", "6.8" ],
"targetBranchChoices" : [ "main", "8.11", "8.10", "8.9", "8.8", "8.7", "8.6", "8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.17", "6.8" ],
"targetPRLabels" : [ "backport" ],
"branchLabelMapping" : {
"^v8.9.0$" : "main",
"^v8.12.0$" : "main",
"^v(\\d+).(\\d+).\\d+(?:-(?:alpha|beta|rc)\\d+)?$" : "$1.$2"
}
}
2 changes: 2 additions & 0 deletions .buildkite/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.ts]
max_line_length = 120
169 changes: 169 additions & 0 deletions .buildkite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore

# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*
Binary file added .buildkite/bun.lockb
Binary file not shown.
9 changes: 9 additions & 0 deletions .buildkite/check-es-serverless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:
- trigger: elasticsearch-serverless-validate-submodule
label: ":elasticsearch: Check elasticsearch changes against serverless"
build:
message: "Validate latest elasticsearch changes"
env:
ELASTICSEARCH_SUBMODULE_COMMIT: "${BUILDKITE_COMMIT}"
UPDATE_SUBMODULE: "false"

107 changes: 107 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#!/bin/bash

# On some distros, this directory ends up not readable by the `elasticsearch` user that gets created during tests
# This fixes that
chmod 755 ~

WORKSPACE="$(pwd)"
export WORKSPACE

BUILD_NUMBER="$BUILDKITE_BUILD_NUMBER"
export BUILD_NUMBER

COMPOSE_HTTP_TIMEOUT="120"
export COMPOSE_HTTP_TIMEOUT

JOB_BRANCH="$BUILDKITE_BRANCH"
export JOB_BRANCH

GRADLEW="./gradlew --parallel --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/"
export GRADLEW

GRADLEW_BAT="./gradlew.bat --parallel --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/"
export GRADLEW_BAT

export $(cat .ci/java-versions.properties | grep '=' | xargs)

JAVA_HOME="$HOME/.java/$ES_BUILD_JAVA"
export JAVA_HOME

JAVA11_HOME="$HOME/.java/java11"
export JAVA11_HOME

JAVA16_HOME="$HOME/.java/openjdk16"
export JAVA16_HOME

if [[ "${ES_RUNTIME_JAVA:-}" ]]; then
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
export RUNTIME_JAVA_HOME
fi

GRADLE_BUILD_CACHE_USERNAME=$(vault read -field=username secret/ci/elastic-elasticsearch/migrated/gradle-build-cache)
export GRADLE_BUILD_CACHE_USERNAME

GRADLE_BUILD_CACHE_PASSWORD=$(vault read -field=password secret/ci/elastic-elasticsearch/migrated/gradle-build-cache)
export GRADLE_BUILD_CACHE_PASSWORD

BUILDKITE_API_TOKEN=$(vault read -field=token secret/ci/elastic-elasticsearch/buildkite-api-token)
export BUILDKITE_API_TOKEN

if [[ "${USE_LUCENE_SNAPSHOT_CREDS:-}" == "true" ]]; then
data=$(.buildkite/scripts/get-legacy-secret.sh aws-elastic/creds/lucene-snapshots)

AWS_ACCESS_KEY_ID=$(echo "$data" | jq -r .data.access_key)
export AWS_ACCESS_KEY_ID

AWS_SECRET_ACCESS_KEY=$(echo "$data" | jq -r .data.secret_key)
export AWS_SECRET_ACCESS_KEY

unset data
fi

if [[ "${USE_DRA_CREDENTIALS:-}" == "true" ]]; then
DRA_VAULT_ROLE_ID_SECRET=$(vault read -field=role-id secret/ci/elastic-elasticsearch/legacy-vault-credentials)
export DRA_VAULT_ROLE_ID_SECRET

DRA_VAULT_SECRET_ID_SECRET=$(vault read -field=secret-id secret/ci/elastic-elasticsearch/legacy-vault-credentials)
export DRA_VAULT_SECRET_ID_SECRET

DRA_VAULT_ADDR=https://secrets.elastic.co:8200
export DRA_VAULT_ADDR
fi

source .buildkite/scripts/third-party-test-credentials.sh

if [[ "${USE_SNYK_CREDENTIALS:-}" == "true" ]]; then
SNYK_TOKEN=$(vault read -field=token secret/ci/elastic-elasticsearch/migrated/snyk)
export SNYK_TOKEN
fi

if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then
DOCKER_REGISTRY_USERNAME="$(vault read -field=username secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_USERNAME

DOCKER_REGISTRY_PASSWORD="$(vault read -field=password secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_PASSWORD
fi

if [[ "$BUILDKITE_AGENT_META_DATA_PROVIDER" != *"k8s"* ]]; then
# Run in the background, while the job continues
nohup .buildkite/scripts/setup-monitoring.sh </dev/null >/dev/null 2>&1 &
fi

# Initialize the build scan and gobld annotations with empty/open <details> tags
# This ensures that they are collapsible when they get appended to
if [[ "${BUILDKITE_LABEL:-}" == *"Pipeline upload"* ]]; then
cat << EOF | buildkite-agent annotate --context "gradle-build-scans" --style "info"
<details>
<summary>Gradle build scan links</summary>
EOF

cat << EOF | buildkite-agent annotate --context "ctx-gobld-metrics" --style "info"
<details>
<summary>Agent information from gobld</summary>
EOF
fi
21 changes: 21 additions & 0 deletions .buildkite/hooks/pre-command.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@ECHO OFF

FOR /F "tokens=* eol=#" %%i in ('type .ci\java-versions.properties') do set %%i

SET JAVA_HOME=%USERPROFILE%\.java\%ES_BUILD_JAVA%
SET JAVA16_HOME=%USERPROFILE%\.java\openjdk16

SET GRADLEW=./gradlew --parallel --no-daemon --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/
SET GRADLEW_BAT=./gradlew.bat --parallel --no-daemon --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/

(if not exist "%USERPROFILE%/.gradle" mkdir "%USERPROFILE%/.gradle") && (echo. >> "%USERPROFILE%/.gradle/gradle.properties" && echo org.gradle.daemon=false >> "%USERPROFILE%/.gradle/gradle.properties")

set WORKSPACE=%cd%
set BUILD_NUMBER=%BUILDKITE_BUILD_NUMBER%
set COMPOSE_HTTP_TIMEOUT=120
set JOB_BRANCH=%BUILDKITE_BRANCH%

set GRADLE_BUILD_CACHE_USERNAME=vault read -field=username secret/ci/elastic-elasticsearch/migrated/gradle-build-cache
set GRADLE_BUILD_CACHE_PASSWORD=vault read -field=password secret/ci/elastic-elasticsearch/migrated/gradle-build-cache

exit /b 0
13 changes: 13 additions & 0 deletions .buildkite/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "buildkite-pipelines",
"module": "index.ts",
"type": "module",
"devDependencies": {
"@types/node": "^20.6.0",
"bun-types": "latest",
"yaml": "^2.3.2"
},
"peerDependencies": {
"typescript": "^5.0.0"
}
}
9 changes: 9 additions & 0 deletions .buildkite/pipelines/dra-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:
- command: .buildkite/scripts/dra-workflow.sh
env:
USE_DRA_CREDENTIALS: "true"
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2204
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
14 changes: 14 additions & 0 deletions .buildkite/pipelines/ecs-dynamic-template-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
steps:
- label: ecs-dynamic-templates-tests
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dtests.configure_test_clusters_with_one_processor=true :x-pack:plugin:stack:javaRestTest
timeout_in_minutes: 420
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
diskSizeGb: 350
machineType: custom-32-98304
notify:
- slack: "#es-delivery"
if: build.state == "failed"
- email: "[email protected]"
if: build.state == "failed"
Loading

0 comments on commit 7e7b739

Please sign in to comment.