-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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' into update-indices
- Loading branch information
Showing
5,175 changed files
with
110,249 additions
and
110,456 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 was deleted.
Oops, something went wrong.
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 @@ | ||
{ | ||
"name": "kibana-buildkite", | ||
"version": "1.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"kibana-buildkite-library": "elastic/kibana-buildkite-library" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
env: | ||
GITHUB_COMMIT_STATUS_ENABLED: 'true' | ||
GITHUB_COMMIT_STATUS_CONTEXT: 'buildkite/kibana-pull-request' | ||
steps: | ||
- command: .buildkite/scripts/lifecycle/pre_build.sh | ||
label: Pre-Build | ||
|
||
- wait | ||
|
||
- command: echo 'Hello World' | ||
label: Test | ||
|
||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/demo_env/es_and_init.sh | ||
label: Initialize Environment and Deploy ES | ||
|
||
- command: .buildkite/scripts/steps/demo_env/kibana.sh | ||
label: Build and Deploy Kibana | ||
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
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,17 @@ | ||
const { BuildkiteClient } = require('kibana-buildkite-library'); | ||
|
||
(async () => { | ||
try { | ||
const client = new BuildkiteClient(); | ||
const status = await client.getCurrentBuildStatus(); | ||
console.log(status.success ? 'true' : 'false'); | ||
process.exit(0); | ||
} catch (ex) { | ||
console.error('Buildkite API Error', ex.message); | ||
if (ex.response) { | ||
console.error('HTTP Error Response Status', ex.response.status); | ||
console.error('HTTP Error Response Body', ex.response.data); | ||
} | ||
process.exit(1); | ||
} | ||
})(); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,14 @@ | ||
const ciStats = require('./ci_stats'); | ||
|
||
// TODO - this is okay for now but should really be replaced with an API call, especially once retries are enabled | ||
const BUILD_STATUS = process.env.BUILD_FAILED === 'true' ? 'FAILURE' : 'SUCCESS'; | ||
const { CiStats } = require('kibana-buildkite-library'); | ||
|
||
(async () => { | ||
try { | ||
if (process.env.CI_STATS_BUILD_ID) { | ||
await ciStats.post(`/v1/build/_complete?id=${process.env.CI_STATS_BUILD_ID}`, { | ||
result: BUILD_STATUS, | ||
}); | ||
} | ||
await CiStats.onComplete(); | ||
} catch (ex) { | ||
console.error(ex); | ||
console.error('CI Stats Error', ex.message); | ||
if (ex.response) { | ||
console.error('HTTP Error Response Status', ex.response.status); | ||
console.error('HTTP Error Response Body', ex.response.data); | ||
} | ||
process.exit(1); | ||
} | ||
})(); |
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 |
---|---|---|
@@ -1,30 +1,14 @@ | ||
const { execSync } = require('child_process'); | ||
const ciStats = require('./ci_stats'); | ||
const { CiStats } = require('kibana-buildkite-library'); | ||
|
||
(async () => { | ||
try { | ||
const build = await ciStats.post('/v1/build', { | ||
jenkinsJobName: process.env.BUILDKITE_PIPELINE_NAME, | ||
jenkinsJobId: process.env.BUILDKITE_BUILD_ID, | ||
jenkinsUrl: process.env.BUILDKITE_BUILD_URL, | ||
prId: process.env.GITHUB_PR_NUMBER || null, | ||
}); | ||
|
||
execSync(`buildkite-agent meta-data set ci_stats_build_id "${build.id}"`); | ||
|
||
// TODO Will need to set MERGE_BASE for PRs | ||
|
||
await ciStats.post(`/v1/git_info?buildId=${build.id}`, { | ||
branch: process.env.BUILDKITE_BRANCH.replace(/^(refs\/heads\/|origin\/)/, ''), | ||
commit: process.env.BUILDKITE_COMMIT, | ||
targetBranch: | ||
process.env.GITHUB_PR_TARGET_BRANCH || | ||
process.env.BUILDKITE_PULL_REQUEST_BASE_BRANCH || | ||
null, | ||
mergeBase: process.env.GITHUB_PR_MERGE_BASE || null, // TODO confirm GITHUB_PR_MERGE_BASE or switch to final var | ||
}); | ||
await CiStats.onStart(); | ||
} catch (ex) { | ||
console.error(ex); | ||
console.error('CI Stats Error', ex.message); | ||
if (ex.response) { | ||
console.error('HTTP Error Response Status', ex.response.status); | ||
console.error('HTTP Error Response Body', ex.response.data); | ||
} | ||
process.exit(1); | ||
} | ||
})(); |
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 was deleted.
Oops, something went wrong.
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 |
Oops, something went wrong.