Skip to content

Commit 251adae

Browse files
Merge branch 'master' into persistablestate/docs
2 parents 233aa39 + d34ef7b commit 251adae

File tree

5,848 files changed

+121830
-129667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,848 files changed

+121830
-129667
lines changed

.backportrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"targetBranchChoices": [
44
{ "name": "master", "checked": true },
55
{ "name": "7.x", "checked": true },
6+
"7.15",
67
"7.14",
78
"7.13",
89
"7.12",
@@ -32,7 +33,7 @@
3233
"targetPRLabels": ["backport"],
3334
"branchLabelMapping": {
3435
"^v8.0.0$": "master",
35-
"^v7.15.0$": "7.x",
36+
"^v7.16.0$": "7.x",
3637
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
3738
},
3839
"autoMerge": true,

.buildkite/hooks/post-command

Lines changed: 0 additions & 3 deletions
This file was deleted.

.buildkite/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "kibana-buildkite",
3+
"version": "1.0.0",
4+
"private": true,
5+
"dependencies": {
6+
"kibana-buildkite-library": "elastic/kibana-buildkite-library"
7+
}
8+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
env:
2+
GITHUB_COMMIT_STATUS_ENABLED: 'true'
3+
GITHUB_COMMIT_STATUS_CONTEXT: 'buildkite/kibana-pull-request'
4+
steps:
5+
- command: .buildkite/scripts/lifecycle/pre_build.sh
6+
label: Pre-Build
7+
8+
- wait
9+
10+
- command: echo 'Hello World'
11+
label: Test
12+
13+
- wait: ~
14+
continue_on_failure: true
15+
16+
- command: .buildkite/scripts/lifecycle/post_build.sh
17+
label: Post-Build
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
steps:
2+
- command: .buildkite/scripts/steps/demo_env/es_and_init.sh
3+
label: Initialize Environment and Deploy ES
4+
5+
- command: .buildkite/scripts/steps/demo_env/kibana.sh
6+
label: Build and Deploy Kibana
7+
agents:
8+
queue: c2-8

.buildkite/scripts/common/env.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@ export TEST_ES_URL="http://elastic:changeme@localhost:6102"
7070
export TEST_ES_TRANSPORT_PORT=6301-6309
7171
export TEST_CORS_SERVER_PORT=6106
7272
export ALERTING_PROXY_PORT=6105
73+
export TEST_PROXY_SERVER_PORT=6107
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const { BuildkiteClient } = require('kibana-buildkite-library');
2+
3+
(async () => {
4+
try {
5+
const client = new BuildkiteClient();
6+
const status = await client.getCurrentBuildStatus();
7+
console.log(status.success ? 'true' : 'false');
8+
process.exit(0);
9+
} catch (ex) {
10+
if (ex.response) {
11+
console.error('HTTP Error Response Body', ex.response.data);
12+
console.error('HTTP Error Response Status', ex.response.status);
13+
}
14+
console.error(ex);
15+
process.exit(1);
16+
}
17+
})();

.buildkite/scripts/lifecycle/ci_stats.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

.buildkite/scripts/lifecycle/ci_stats_complete.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
const ciStats = require('./ci_stats');
2-
3-
// TODO - this is okay for now but should really be replaced with an API call, especially once retries are enabled
4-
const BUILD_STATUS = process.env.BUILD_FAILED === 'true' ? 'FAILURE' : 'SUCCESS';
1+
const { CiStats } = require('kibana-buildkite-library');
52

63
(async () => {
74
try {
8-
if (process.env.CI_STATS_BUILD_ID) {
9-
await ciStats.post(`/v1/build/_complete?id=${process.env.CI_STATS_BUILD_ID}`, {
10-
result: BUILD_STATUS,
11-
});
12-
}
5+
await CiStats.onComplete();
136
} catch (ex) {
147
console.error(ex);
158
process.exit(1);

.buildkite/scripts/lifecycle/ci_stats_start.js

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
1-
const { execSync } = require('child_process');
2-
const ciStats = require('./ci_stats');
1+
const { CiStats } = require('kibana-buildkite-library');
32

43
(async () => {
54
try {
6-
const build = await ciStats.post('/v1/build', {
7-
jenkinsJobName: process.env.BUILDKITE_PIPELINE_NAME,
8-
jenkinsJobId: process.env.BUILDKITE_BUILD_ID,
9-
jenkinsUrl: process.env.BUILDKITE_BUILD_URL,
10-
prId: process.env.GITHUB_PR_NUMBER || null,
11-
});
12-
13-
execSync(`buildkite-agent meta-data set ci_stats_build_id "${build.id}"`);
14-
15-
// TODO Will need to set MERGE_BASE for PRs
16-
17-
await ciStats.post(`/v1/git_info?buildId=${build.id}`, {
18-
branch: process.env.BUILDKITE_BRANCH.replace(/^(refs\/heads\/|origin\/)/, ''),
19-
commit: process.env.BUILDKITE_COMMIT,
20-
targetBranch:
21-
process.env.GITHUB_PR_TARGET_BRANCH ||
22-
process.env.BUILDKITE_PULL_REQUEST_BASE_BRANCH ||
23-
null,
24-
mergeBase: process.env.GITHUB_PR_MERGE_BASE || null, // TODO confirm GITHUB_PR_MERGE_BASE or switch to final var
25-
});
5+
await CiStats.onStart();
266
} catch (ex) {
277
console.error(ex);
288
process.exit(1);

0 commit comments

Comments
 (0)