-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:elastic/kibana into telemetry/rem…
…ove_request_package
- Loading branch information
Showing
3,093 changed files
with
126,636 additions
and
89,016 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/es_snapshots/build.sh | ||
label: Build ES Snapshot | ||
agents: | ||
queue: c2-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
steps: | ||
- block: 'Promote' | ||
prompt: "Enter the details for the snapshot you'd like to promote" | ||
if: "build.env('ES_SNAPSHOT_MANIFEST') == null" | ||
# Later, this could be a dropdown dynamically filled with recent builds | ||
fields: | ||
- text: 'ES_SNAPSHOT_MANIFEST' | ||
key: 'ES_SNAPSHOT_MANIFEST' | ||
hint: 'URL pointing to the manifest to promote' | ||
required: true | ||
- label: Promote Snapshot | ||
command: .buildkite/scripts/steps/es_snapshots/promote.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
env: | ||
IGNORE_SHIP_CI_STATS_ERROR: 'true' | ||
steps: | ||
- block: 'Verify' | ||
prompt: "Enter the details for the snapshot you'd like to verify" | ||
if: "build.env('ES_SNAPSHOT_MANIFEST') == null" | ||
# Later, this could be a dropdown dynamically filled with recent builds | ||
fields: | ||
- text: 'ES_SNAPSHOT_MANIFEST' | ||
key: 'ES_SNAPSHOT_MANIFEST' | ||
hint: 'URL pointing to the manifest to promote' | ||
required: true | ||
|
||
- command: .buildkite/scripts/lifecycle/pre_build.sh | ||
label: Pre-Build | ||
|
||
- wait | ||
|
||
- command: .buildkite/scripts/steps/build_kibana.sh | ||
label: Build Kibana Distribution and Plugins | ||
agents: | ||
queue: c2-8 | ||
key: build | ||
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" | ||
|
||
- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh | ||
label: 'Default CI Group' | ||
parallelism: 13 | ||
agents: | ||
queue: ci-group-6 | ||
artifact_paths: target/junit/**/*.xml | ||
depends_on: build | ||
key: default-cigroup | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh | ||
label: 'Docker CI Group' | ||
agents: | ||
queue: ci-group-6 | ||
artifact_paths: target/junit/**/*.xml | ||
depends_on: build | ||
key: default-cigroup-docker | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/oss_cigroup.sh | ||
label: 'OSS CI Group' | ||
parallelism: 12 | ||
agents: | ||
queue: ci-group-4d | ||
artifact_paths: target/junit/**/*.xml | ||
depends_on: build | ||
key: oss-cigroup | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/test/jest_integration.sh | ||
label: 'Jest Integration Tests' | ||
agents: | ||
queue: jest | ||
artifact_paths: target/junit/**/*.xml | ||
key: jest-integration | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/test/api_integration.sh | ||
label: 'API Integration Tests' | ||
agents: | ||
queue: jest | ||
artifact_paths: target/junit/**/*.xml | ||
key: api-integration | ||
|
||
- command: .buildkite/scripts/steps/es_snapshots/trigger_promote.sh | ||
label: Trigger promotion | ||
depends_on: | ||
- default-cigroup | ||
- default-cigroup-docker | ||
- oss-cigroup | ||
- jest-integration | ||
- api-integration | ||
|
||
- wait: ~ | ||
continue_on_failure: true | ||
|
||
- plugins: | ||
- junit-annotate#v1.9.0: | ||
artifacts: target/junit/**/*.xml | ||
|
||
- wait: ~ | ||
continue_on_failure: true | ||
|
||
- command: .buildkite/scripts/lifecycle/post_build.sh | ||
label: Post-Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
.buildkite/scripts/bootstrap.sh | ||
.buildkite/scripts/build_kibana.sh | ||
.buildkite/scripts/build_kibana_plugins.sh | ||
.buildkite/scripts/post_build_kibana.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
BASE_BUCKET_DAILY: 'kibana-ci-es-snapshots-daily', | ||
BASE_BUCKET_PERMANENT: 'kibana-ci-es-snapshots-permanent', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/common/util.sh | ||
|
||
echo "--- Cloning Elasticsearch and preparing workspace" | ||
|
||
cd .. | ||
destination="$(pwd)/es-build" | ||
rm -rf "$destination" | ||
mkdir -p "$destination" | ||
|
||
mkdir -p elasticsearch && cd elasticsearch | ||
|
||
export ELASTICSEARCH_BRANCH="${ELASTICSEARCH_BRANCH:-$BUILDKITE_BRANCH}" | ||
|
||
if [[ ! -d .git ]]; then | ||
git init | ||
git remote add origin https://github.com/elastic/elasticsearch.git | ||
fi | ||
git fetch origin --depth 1 "$ELASTICSEARCH_BRANCH" | ||
git reset --hard FETCH_HEAD | ||
|
||
ELASTICSEARCH_GIT_COMMIT="$(git rev-parse HEAD)" | ||
export ELASTICSEARCH_GIT_COMMIT | ||
|
||
ELASTICSEARCH_GIT_COMMIT_SHORT="$(git rev-parse --short HEAD)" | ||
export ELASTICSEARCH_GIT_COMMIT_SHORT | ||
|
||
# These turn off automation in the Elasticsearch repo | ||
export BUILD_NUMBER="" | ||
export JENKINS_URL="" | ||
export BUILD_URL="" | ||
export JOB_NAME="" | ||
export NODE_NAME="" | ||
export DOCKER_BUILDKIT="" | ||
|
||
# Reads the ES_BUILD_JAVA env var out of .ci/java-versions.properties and exports it | ||
export "$(grep '^ES_BUILD_JAVA' .ci/java-versions.properties | xargs)" | ||
|
||
export PATH="$HOME/.java/$ES_BUILD_JAVA/bin:$PATH" | ||
export JAVA_HOME="$HOME/.java/$ES_BUILD_JAVA" | ||
|
||
# The Elasticsearch Dockerfile needs to be built with root privileges, but Docker on our servers is running using a non-root user | ||
# So, let's use docker-in-docker to temporarily create a privileged docker daemon to run `docker build` on | ||
# We have to do this, because there's no `docker build --privileged` or similar | ||
|
||
echo "--- Setting up Docker-in-Docker for Elasticsearch" | ||
|
||
docker rm -f dind || true # If there's an old daemon running that somehow didn't get cleaned up, lets remove it first | ||
CERTS_DIR="$HOME/dind-certs" | ||
rm -rf "$CERTS_DIR" | ||
docker run -d --rm --privileged --name dind --userns host -p 2377:2376 -e DOCKER_TLS_CERTDIR=/certs -v "$CERTS_DIR":/certs docker:dind | ||
|
||
trap "docker rm -f dind" EXIT | ||
|
||
export DOCKER_TLS_VERIFY=true | ||
export DOCKER_CERT_PATH="$CERTS_DIR/client" | ||
export DOCKER_TLS_CERTDIR="$CERTS_DIR" | ||
export DOCKER_HOST=localhost:2377 | ||
|
||
echo "--- Build Elasticsearch" | ||
./gradlew -Dbuild.docker=true assemble --parallel | ||
|
||
echo "--- Create distribution archives" | ||
find distribution -type f \( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \) -not -path '*no-jdk*' -not -path '*build-context*' -exec cp {} "$destination" \; | ||
|
||
ls -alh "$destination" | ||
|
||
echo "--- Create docker image archives" | ||
docker images "docker.elastic.co/elasticsearch/elasticsearch" | ||
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 echo 'docker save docker.elastic.co/elasticsearch/elasticsearch:${0} | gzip > ../es-build/elasticsearch-${0}-docker-image.tar.gz' | ||
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 bash -c 'docker save docker.elastic.co/elasticsearch/elasticsearch:${0} | gzip > ../es-build/elasticsearch-${0}-docker-image.tar.gz' | ||
|
||
echo "--- Create checksums for snapshot files" | ||
cd "$destination" | ||
find ./* -exec bash -c "shasum -a 512 {} > {}.sha512" \; | ||
|
||
cd "$BUILDKITE_BUILD_CHECKOUT_PATH" | ||
node "$(dirname "${0}")/create_manifest.js" "$destination" | ||
|
||
ES_SNAPSHOT_MANIFEST="$(buildkite-agent meta-data get ES_SNAPSHOT_MANIFEST)" | ||
|
||
cat << EOF | buildkite-agent annotate --style "info" | ||
- \`ELASTICSEARCH_BRANCH\` - \`$ELASTICSEARCH_BRANCH\` | ||
- \`ELASTICSEARCH_GIT_COMMIT\` - \`$ELASTICSEARCH_GIT_COMMIT\` | ||
- \`ES_SNAPSHOT_MANIFEST\` - \`$ES_SNAPSHOT_MANIFEST\` | ||
- \`ES_SNAPSHOT_VERSION\` - \`$(buildkite-agent meta-data get ES_SNAPSHOT_VERSION)\` | ||
- \`ES_SNAPSHOT_ID\` - \`$(buildkite-agent meta-data get ES_SNAPSHOT_ID)\` | ||
EOF | ||
|
||
cat << EOF | buildkite-agent pipeline upload | ||
steps: | ||
- trigger: 'kibana-elasticsearch-snapshot-verify' | ||
async: true | ||
build: | ||
env: | ||
ES_SNAPSHOT_MANIFEST: '$ES_SNAPSHOT_MANIFEST' | ||
branch: '$BUILDKITE_BRANCH' | ||
EOF |
Oops, something went wrong.