Skip to content

Commit eadaa8c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into mitre-upgrade-v15.1
2 parents 285632e + b008622 commit eadaa8c

885 files changed

Lines changed: 5333 additions & 1920 deletions

File tree

Some content is hidden

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

.buildkite/pipelines/artifacts.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ steps:
66
imageProject: elastic-images-qa
77
provider: gcp
88
machineType: c2-standard-16
9-
timeout_in_minutes: 60
9+
timeout_in_minutes: 75
1010
retry:
1111
automatic:
1212
- exit_status: '*'
@@ -95,7 +95,10 @@ steps:
9595
- command: KIBANA_DOCKER_CONTEXT=chainguard .buildkite/scripts/steps/artifacts/docker_context.sh
9696
label: 'Docker Context Verification'
9797
agents:
98-
queue: n2-2
98+
image: family/kibana-ubuntu-2004
99+
imageProject: elastic-images-qa
100+
provider: gcp
101+
machineType: n2-standard-2
99102
timeout_in_minutes: 30
100103
retry:
101104
automatic:

.buildkite/scripts/common/vault_fns.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,23 @@ vault_kv_set() {
6565

6666
vault kv put "$VAULT_KV_PREFIX/$kv_path" "${fields[@]}"
6767
}
68+
69+
function get_vault_role_id() {
70+
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
71+
VAULT_ROLE_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-role-id)"
72+
else
73+
VAULT_ROLE_ID="$(vault_get kibana-buildkite-vault-credentials role-id)"
74+
fi
75+
76+
echo "$VAULT_ROLE_ID"
77+
}
78+
79+
function get_vault_secret_id() {
80+
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
81+
VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)"
82+
else
83+
VAULT_SECRET_ID="$(vault_get kibana-buildkite-vault-credentials secret-id)"
84+
fi
85+
86+
echo "$VAULT_SECRET_ID"
87+
}

.buildkite/scripts/steps/artifacts/docker_image.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ node scripts/build \
3535
--skip-docker-chainguard \
3636
--skip-docker-ubi \
3737
--skip-docker-fips \
38-
--skip-docker-cloud \
39-
--skip-docker-contexts
38+
--skip-docker-cloud
4039

4140
echo "--- Tag images"
4241
docker rmi "$KIBANA_IMAGE"
@@ -102,8 +101,9 @@ ts-node "$(git rev-parse --show-toplevel)/.buildkite/scripts/steps/artifacts/val
102101
echo "--- Upload archives"
103102
buildkite-agent artifact upload "kibana-$BASE_VERSION-linux-x86_64.tar.gz"
104103
buildkite-agent artifact upload "kibana-$BASE_VERSION-linux-aarch64.tar.gz"
105-
buildkite-agent artifact upload "kibana-$BASE_VERSION-docker-image.tar.gz"
106-
buildkite-agent artifact upload "kibana-$BASE_VERSION-docker-image-aarch64.tar.gz"
104+
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image.tar.gz"
105+
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz"
106+
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-build-context.tar.gz"
107107
buildkite-agent artifact upload "kibana-$BASE_VERSION-cdn-assets.tar.gz"
108108
buildkite-agent artifact upload "dependencies-$GIT_ABBREV_COMMIT.csv"
109109

.buildkite/scripts/steps/artifacts/publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ docker pull docker.elastic.co/infra/release-manager:latest
5353

5454
echo "--- Publish artifacts"
5555
if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]]; then
56-
export VAULT_ROLE_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-role-id)"
57-
export VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)"
56+
export VAULT_ROLE_ID="$(get_vault_role_id)"
57+
export VAULT_SECRET_ID="$(get_vault_secret_id)"
5858
export VAULT_ADDR="https://secrets.elastic.co:8200"
5959

6060
download_artifact beats_manifest.json /tmp --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"

.buildkite/scripts/steps/cloud/build_and_deploy.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ if [ -z "${CLOUD_DEPLOYMENT_ID}" ] || [ "${CLOUD_DEPLOYMENT_ID}" = 'null' ]; the
8181
CLOUD_DEPLOYMENT_STATUS_MESSAGES=$(jq --slurp '[.[]|select(.resources == null)]' "$ECCTL_LOGS")
8282

8383
echo "Writing to vault..."
84-
VAULT_ROLE_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-role-id)"
85-
VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)"
86-
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
87-
retry 5 30 vault login -no-print "$VAULT_TOKEN"
8884

8985
# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
9086
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
87+
VAULT_ROLE_ID="$(get_vault_role_id)"
88+
VAULT_SECRET_ID="$(get_vault_secret_id)"
89+
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
90+
retry 5 30 vault login -no-print "$VAULT_TOKEN"
9191
vault_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
9292
else
9393
vault_kv_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
@@ -123,16 +123,16 @@ else
123123
ecctl deployment update "$CLOUD_DEPLOYMENT_ID" --track --output json --file /tmp/deploy.json > "$ECCTL_LOGS"
124124
fi
125125

126-
CLOUD_DEPLOYMENT_KIBANA_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.kibana[0].info.metadata.aliased_url')
127-
CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.elasticsearch[0].info.metadata.aliased_url')
128-
129126
# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
130127
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
131128
VAULT_READ_COMMAND="vault read $VAULT_PATH_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME"
132129
else
133130
VAULT_READ_COMMAND="vault kv get $VAULT_KV_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME"
134131
fi
135132

133+
CLOUD_DEPLOYMENT_KIBANA_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.kibana[0].info.metadata.aliased_url')
134+
CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.elasticsearch[0].info.metadata.aliased_url')
135+
136136
cat << EOF | buildkite-agent annotate --style "info" --context cloud
137137
### Cloud Deployment
138138

.buildkite/scripts/steps/serverless/deploy.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ deploy() {
8989
PROJECT_PASSWORD=$(jq -r --slurp '.[2].password' $DEPLOY_LOGS)
9090

9191
echo "Write to vault..."
92-
VAULT_ROLE_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-role-id)"
93-
VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)"
94-
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
95-
retry 5 30 vault login -no-print "$VAULT_TOKEN"
9692

9793
# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
9894
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
95+
VAULT_ROLE_ID="$(get_vault_role_id)"
96+
VAULT_SECRET_ID="$(get_vault_secret_id)"
97+
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
98+
retry 5 30 vault login -no-print "$VAULT_TOKEN"
9999
vault_set "cloud-deploy/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
100100
else
101101
vault_kv_set "cloud-deploy/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
@@ -142,7 +142,7 @@ create_github_issue_oblt_test_environments() {
142142

143143
echo "--- Create GitHub issue for deploying in the oblt test env"
144144

145-
GITHUB_ISSUE=$(mktemp --suffix ".md")
145+
GITHUB_ISSUE=$(mktemp --suffix ".md")
146146
cat <<EOF > "$GITHUB_ISSUE"
147147
### Kibana image
148148

api_docs/actions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
88
title: "actions"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the actions plugin
11-
date: 2024-05-14
11+
date: 2024-05-15
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
1313
---
1414
import actionsObj from './actions.devdocs.json';

api_docs/advanced_settings.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
88
title: "advancedSettings"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the advancedSettings plugin
11-
date: 2024-05-14
11+
date: 2024-05-15
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
1313
---
1414
import advancedSettingsObj from './advanced_settings.devdocs.json';

api_docs/ai_assistant_management_selection.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection
88
title: "aiAssistantManagementSelection"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the aiAssistantManagementSelection plugin
11-
date: 2024-05-14
11+
date: 2024-05-15
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection']
1313
---
1414
import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json';

api_docs/aiops.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
88
title: "aiops"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the aiops plugin
11-
date: 2024-05-14
11+
date: 2024-05-15
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
1313
---
1414
import aiopsObj from './aiops.devdocs.json';

0 commit comments

Comments
 (0)