Skip to content

Commit

Permalink
Merge branch 'master' into react-router-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Aug 26, 2021
2 parents 8b8d494 + a50a879 commit ddd62ff
Show file tree
Hide file tree
Showing 351 changed files with 13,751 additions and 6,925 deletions.
3 changes: 0 additions & 3 deletions .buildkite/hooks/post-command

This file was deleted.

8 changes: 8 additions & 0 deletions .buildkite/package.json
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"
}
}
17 changes: 17 additions & 0 deletions .buildkite/pipelines/pull_request.yml
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
17 changes: 17 additions & 0 deletions .buildkite/scripts/lifecycle/build_status.js
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) {
if (ex.response) {
console.error('HTTP Error Response Body', ex.response.data);
console.error('HTTP Error Response Status', ex.response.status);
}
console.error(ex);
process.exit(1);
}
})();
59 changes: 0 additions & 59 deletions .buildkite/scripts/lifecycle/ci_stats.js

This file was deleted.

11 changes: 2 additions & 9 deletions .buildkite/scripts/lifecycle/ci_stats_complete.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
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);
process.exit(1);
Expand Down
24 changes: 2 additions & 22 deletions .buildkite/scripts/lifecycle/ci_stats_start.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
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);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/lifecycle/commit_status_complete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

if [[ "${GITHUB_COMMIT_STATUS_ENABLED:-}" == "true" ]]; then
COMMIT_STATUS=success
if [[ "${BUILD_FAILED:-}" == "true" ]]; then
if [[ "${BUILD_SUCCESSFUL:-}" != "true" ]]; then
COMMIT_STATUS=failure
fi

Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/lifecycle/post_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -euo pipefail

BUILD_FAILED=$(buildkite-agent meta-data get build_failed --default "false")
export BUILD_FAILED
BUILD_SUCCESSFUL=$(node "$(dirname "${0}")/build_status.js")
export BUILD_SUCCESSFUL

"$(dirname "${0}")/commit_status_complete.sh"

Expand Down
7 changes: 0 additions & 7 deletions .buildkite/scripts/lifecycle/post_command.sh

This file was deleted.

7 changes: 7 additions & 0 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -euo pipefail

cd '.buildkite'
yarn install
cd -

BUILDKITE_TOKEN="$(vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
export BUILDKITE_TOKEN

# Set up a custom ES Snapshot Manifest if one has been specified for this build
{
ES_SNAPSHOT_MANIFEST=${ES_SNAPSHOT_MANIFEST:-$(buildkite-agent meta-data get ES_SNAPSHOT_MANIFEST --default '')}
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report_security_solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report for Security Solution
about: Help us identify bugs in Elastic Security, SIEM, and Endpoint so we can fix them!
title: '[Security Solution]'
labels: 'bug, Team: SecuritySolution'
labels: 'bug, Team: SecuritySolution, triage_needed'
---

**Describe the bug:**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
{"label": "Feature:Drilldowns", "projectNumber": 68, "columnName": "Inbox"},
{"label": "Feature:Input Controls", "projectNumber": 72, "columnName": "Inbox"},
{"label": "Team:Security", "projectNumber": 320, "columnName": "Awaiting triage", "projectScope": "org"},
{"label": "Team:Operations", "projectNumber": 314, "columnName": "Triage", "projectScope": "org"}
{"label": "Team:Operations", "projectNumber": 314, "columnName": "Triage", "projectScope": "org"},
{"label": "Team:Fleet", "projectNumber": 490, "columnName": "Inbox", "projectScope": "org"}
]
ghToken: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}
4 changes: 0 additions & 4 deletions docs/apm/apm-app-users.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ Here are two examples:
|Grants the privileges required to create, update, and view machine learning jobs
|====

include::./tab-widgets/code.asciidoc[]

////
*********************************** ***********************************
////
Expand Down Expand Up @@ -233,8 +231,6 @@ and the following Kibana feature privileges to anyone who needs to read central

See <<apm-app-api-user>>.

include::./tab-widgets/code.asciidoc[]

////
*********************************** ***********************************
////
Expand Down
Loading

0 comments on commit ddd62ff

Please sign in to comment.