-
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 remote-tracking branch 'upstream/main' into ml-dv-stats-for-non…
…-aggregatable
- Loading branch information
Showing
1,487 changed files
with
36,241 additions
and
6,961 deletions.
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
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,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { execSync } from 'child_process'; | ||
|
||
const getKibanaDir = (() => { | ||
let kibanaDir: string | undefined; | ||
return () => { | ||
if (!kibanaDir) { | ||
kibanaDir = execSync('git rev-parse --show-toplevel', { encoding: 'utf-8' }) | ||
.toString() | ||
.trim(); | ||
} | ||
|
||
return kibanaDir; | ||
}; | ||
})(); | ||
|
||
export { getKibanaDir }; |
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
37 changes: 37 additions & 0 deletions
37
.buildkite/pipelines/serverless_deployment/create_deployment_tag.yml
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,37 @@ | ||
## Creates deploy@<timestamp> tag on Kibana | ||
|
||
agents: | ||
queue: kibana-default | ||
|
||
steps: | ||
- label: "List potential commits" | ||
commands: | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/release_wizard_messaging.ts --state initialize | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/release_wizard_messaging.ts --state collect_commits | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/list_commit_candidates.ts 50 | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/release_wizard_messaging.ts --state wait_for_selection | ||
key: select_commit | ||
env: | ||
AUTO_SELECT_COMMIT: $AUTO_SELECT_COMMIT | ||
|
||
- wait: ~ | ||
|
||
- label: "Collect commit info" | ||
commands: | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/release_wizard_messaging.ts --state collect_commit_info | ||
- bash .buildkite/scripts/serverless/create_deploy_tag/collect_commit_info.sh | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/release_wizard_messaging.ts --state wait_for_confirmation | ||
key: collect_data | ||
depends_on: select_commit | ||
env: | ||
AUTO_SELECT_COMMIT: $AUTO_SELECT_COMMIT | ||
|
||
- wait: ~ | ||
|
||
- label: ":ship: Create Deploy Tag" | ||
commands: | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/release_wizard_messaging.ts --state create_deploy_tag | ||
- bash .buildkite/scripts/serverless/create_deploy_tag/create_deploy_tag.sh | ||
- ts-node .buildkite/scripts/serverless/create_deploy_tag/release_wizard_messaging.ts --state tag_created | ||
env: | ||
DRY_RUN: $DRY_RUN |
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
21 changes: 21 additions & 0 deletions
21
.buildkite/scripts/serverless/create_deploy_tag/collect_commit_info.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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
# SO migration comparison lives in the Kibana dev app code, needs bootstrapping | ||
.buildkite/scripts/bootstrap.sh | ||
|
||
echo "--- Collecting commit info" | ||
ts-node .buildkite/scripts/serverless/create_deploy_tag/collect_commit_info.ts | ||
|
||
if [[ "$AUTO_SELECT_COMMIT" == "true" || "$AUTO_SELECT_COMMIT" == "1" ]]; then | ||
echo "--- Auto promoting to RC, skipping confirmation" | ||
else | ||
echo "--- Uploading confirmation step" | ||
cat << EOF | buildkite-agent pipeline upload | ||
steps: | ||
- block: "Confirm deployment" | ||
prompt: "Are you sure you want to deploy to production? (dry run: ${DRY_RUN:-false})" | ||
depends_on: collect_data | ||
EOF | ||
fi |
Oops, something went wrong.