Skip to content

Commit d59e181

Browse files
committed
Merge remote-tracking branch 'upstream/9.1' into update-version-next-9.1.1
2 parents 5c102fa + 3663dc5 commit d59e181

File tree

20 files changed

+466
-87
lines changed

20 files changed

+466
-87
lines changed

.buildkite/bk.integration-fips.pipeline.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ env:
44
ASDF_MAGE_VERSION: 1.14.0
55
MS_GOTOOLCHAIN_TELEMETRY_ENABLED: "0"
66

7-
IMAGE_UBUNTU_2404_X86_64: "platform-ingest-elastic-agent-ubuntu-2404-1752886846"
8-
IMAGE_UBUNTU_X86_64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-1752886846"
9-
IMAGE_UBUNTU_ARM64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-aarch64-1752886846"
7+
IMAGE_UBUNTU_2404_X86_64: "platform-ingest-elastic-agent-ubuntu-2404-1753491662"
8+
IMAGE_UBUNTU_X86_64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-1753491662"
9+
IMAGE_UBUNTU_ARM64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-aarch64-1753491662"
1010
# Remove AGENT_VERSION pinning once 9.1.1 DRA and stack are released
1111
AGENT_VERSION: "9.1.0-SNAPSHOT"
1212

@@ -47,6 +47,7 @@ steps:
4747
- integration-fips-cloud-image
4848
env:
4949
ASDF_TERRAFORM_VERSION: 1.9.2
50+
FIPS: "true"
5051
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}"
5152
command: |
5253
source .buildkite/scripts/steps/ess_start.sh
@@ -57,7 +58,7 @@ steps:
5758
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5"
5859
useCustomGlobalHooks: true
5960
plugins:
60-
- *vault_ec_key_prod
61+
- *vault_ec_key_prod
6162

6263
- group: "fips:Stateful:Ubuntu"
6364
key: integration-tests-ubuntu-fips
@@ -85,7 +86,7 @@ steps:
8586
image: "${IMAGE_UBUNTU_X86_64_FIPS}"
8687
instanceType: "m5.2xlarge"
8788
plugins:
88-
- *vault_ec_key_prod
89+
- *vault_ec_key_prod
8990
matrix:
9091
setup:
9192
sudo:
@@ -115,7 +116,7 @@ steps:
115116
image: "${IMAGE_UBUNTU_ARM64_FIPS}"
116117
instanceType: "m6g.2xlarge"
117118
plugins:
118-
- *vault_ec_key_prod
119+
- *vault_ec_key_prod
119120
matrix:
120121
setup:
121122
sudo:
@@ -130,7 +131,6 @@ steps:
130131
FIPS: "true"
131132
TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess"
132133
command: |
133-
export EC_API_KEY=$(retry -t 5 -- vault kv get -field=apiKey kv/ci-shared/platform-ingest/platform-ingest-ec-prod)
134134
.buildkite/scripts/buildkite-integration-tests.sh ech-deployment false
135135
artifact_paths:
136136
- build/**
@@ -142,6 +142,8 @@ steps:
142142
provider: "aws"
143143
image: "${IMAGE_UBUNTU_X86_64_FIPS}"
144144
instanceType: "m5.2xlarge"
145+
plugins:
146+
- *vault_ec_key_prod
145147

146148
- label: ESS FIPS stack cleanup
147149
depends_on:

.buildkite/pipeline.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ env:
55

66
# The following images are defined here and their values will be updated by updatecli
77
# Please do not change them manually.
8-
IMAGE_UBUNTU_2204_X86_64: "platform-ingest-elastic-agent-ubuntu-2204-1752886846"
9-
IMAGE_UBUNTU_2204_ARM_64: "platform-ingest-elastic-agent-ubuntu-2204-aarch64-1752886846"
10-
IMAGE_WIN_2016: "platform-ingest-elastic-agent-windows-2016-1752886846"
11-
IMAGE_WIN_2022: "platform-ingest-elastic-agent-windows-2022-1752886846"
12-
IMAGE_WIN_10: "platform-ingest-elastic-agent-windows-10-1752886846"
13-
IMAGE_WIN_11: "platform-ingest-elastic-agent-windows-11-1752886846"
8+
IMAGE_UBUNTU_2204_X86_64: "platform-ingest-elastic-agent-ubuntu-2204-1753491662"
9+
IMAGE_UBUNTU_2204_ARM_64: "platform-ingest-elastic-agent-ubuntu-2204-aarch64-1753491662"
10+
IMAGE_WIN_2016: "platform-ingest-elastic-agent-windows-2016-1753491662"
11+
IMAGE_WIN_2022: "platform-ingest-elastic-agent-windows-2022-1753491662"
12+
IMAGE_WIN_10: "platform-ingest-elastic-agent-windows-10-1753491662"
13+
IMAGE_WIN_11: "platform-ingest-elastic-agent-windows-11-1753491662"
1414

1515
steps:
1616
- label: "check-ci"

.buildkite/scripts/steps/ess.ps1

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ function ess_up {
55
)
66

77
Write-Output "~~~ Starting ESS Stack"
8-
8+
99
$Workspace = & git rev-parse --show-toplevel
1010
$TfDir = Join-Path -Path $Workspace -ChildPath "test_infra/ess/"
1111

1212
if (-not $StackVersion) {
1313
Write-Error "Error: Specify stack version: ess_up [stack_version]"
1414
return 1
1515
}
16-
16+
1717
$BuildkiteBuildCreator = if ($Env:BUILDKITE_BUILD_CREATOR) { $Env:BUILDKITE_BUILD_CREATOR } else { get_git_user_email }
1818
$BuildkiteBuildNumber = if ($Env:BUILDKITE_BUILD_NUMBER) { $Env:BUILDKITE_BUILD_NUMBER } else { "0" }
1919
$BuildkitePipelineSlug = if ($Env:BUILDKITE_PIPELINE_SLUG) { $Env:BUILDKITE_PIPELINE_SLUG } else { "elastic-agent-integration-tests" }
@@ -37,7 +37,7 @@ function ess_up {
3737
Pop-Location
3838
}
3939

40-
function ess_down {
40+
function ess_down {
4141
$Workspace = & git rev-parse --show-toplevel
4242
$TfDir = Join-Path -Path $Workspace -ChildPath "test_infra/ess/"
4343
$stateFilePath = Join-Path -Path $TfDir -ChildPath "terraform.tfstate"
@@ -81,11 +81,11 @@ function Retry-Command {
8181
$lastError = $null
8282

8383
for ($attempt = 1; $attempt -le $MaxRetries; $attempt++) {
84-
try {
85-
$result = & $ScriptBlock
84+
try {
85+
$result = & $ScriptBlock
8686
return $result
8787
}
88-
catch {
88+
catch {
8989
$lastError = $_
9090
Write-Warning "Attempt $attempt failed: $($_.Exception.Message)"
9191
Write-Warning "Retrying in $DelaySeconds seconds..."
@@ -101,12 +101,14 @@ function Get-Ess-Stack {
101101
param (
102102
[string]$StackVersion
103103
)
104-
104+
105105
if ($Env:BUILDKITE_RETRY_COUNT -gt 0) {
106-
Write-Output "The step is retried, starting the ESS stack again"
106+
Write-Output "The step is retried, starting the ESS stack again"
107107
ess_up $StackVersion
108108
Write-Output "ESS stack is up. ES_HOST: $Env:ELASTICSEARCH_HOST"
109109
} else {
110+
# TODO: Use a metadata prefix for "fips." if we ever need to test Windows artifacts for FIPS.
111+
110112
# For the first run, we retrieve ESS stack metadata
111113
Write-Output "~~~ Receiving ESS stack metadata"
112114
$Env:ELASTICSEARCH_HOST = & buildkite-agent meta-data get "es.host"

.buildkite/scripts/steps/ess_start.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,18 @@ ess_up $OVERRIDE_STACK_VERSION
1212
preinstall_fleet_packages
1313

1414
echo "ES_HOST: ${ELASTICSEARCH_HOST}"
15-
buildkite-agent meta-data set "es.host" $ELASTICSEARCH_HOST
16-
buildkite-agent meta-data set "es.username" $ELASTICSEARCH_USERNAME
17-
buildkite-agent meta-data set "es.pwd" $ELASTICSEARCH_PASSWORD
18-
buildkite-agent meta-data set "kibana.host" $KIBANA_HOST
19-
buildkite-agent meta-data set "kibana.username" $KIBANA_USERNAME
20-
buildkite-agent meta-data set "kibana.pwd" $KIBANA_PASSWORD
21-
buildkite-agent meta-data set "integrations_server.host" $INTEGRATIONS_SERVER_HOST
15+
echo "BUILDKITE_JOB_ID: ${BUILDKITE_JOB_ID}"
16+
17+
METADATA_PREFIX=""
18+
if [[ "${FIPS:-false}" == "true" ]]; then
19+
METADATA_PREFIX="fips."
20+
echo "Using FIPS metadata prefix: ${METADATA_PREFIX}"
21+
fi
22+
23+
buildkite-agent meta-data set "${METADATA_PREFIX}es.host" $ELASTICSEARCH_HOST
24+
buildkite-agent meta-data set "${METADATA_PREFIX}es.username" $ELASTICSEARCH_USERNAME
25+
buildkite-agent meta-data set "${METADATA_PREFIX}es.pwd" $ELASTICSEARCH_PASSWORD
26+
buildkite-agent meta-data set "${METADATA_PREFIX}kibana.host" $KIBANA_HOST
27+
buildkite-agent meta-data set "${METADATA_PREFIX}kibana.username" $KIBANA_USERNAME
28+
buildkite-agent meta-data set "${METADATA_PREFIX}kibana.pwd" $KIBANA_PASSWORD
29+
buildkite-agent meta-data set "${METADATA_PREFIX}integrations_server.host" $INTEGRATIONS_SERVER_HOST

.buildkite/scripts/steps/integration_tests_tf.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@ if [[ "${BUILDKITE_RETRY_COUNT}" -gt 0 ]]; then
3939
else
4040
# For the first run, we start the stack in the start_ess.sh step and it sets the meta-data
4141
echo "~~~ Receiving ESS stack metadata"
42-
export ELASTICSEARCH_HOST=$(buildkite-agent meta-data get "es.host")
43-
export ELASTICSEARCH_USERNAME=$(buildkite-agent meta-data get "es.username")
44-
export ELASTICSEARCH_PASSWORD=$(buildkite-agent meta-data get "es.pwd")
45-
export KIBANA_HOST=$(buildkite-agent meta-data get "kibana.host")
46-
export KIBANA_USERNAME=$(buildkite-agent meta-data get "kibana.username")
47-
export KIBANA_PASSWORD=$(buildkite-agent meta-data get "kibana.pwd")
48-
export INTEGRATIONS_SERVER_HOST=$(buildkite-agent meta-data get "integrations_server.host")
42+
METADATA_PREFIX=""
43+
if [[ "${FIPS:-false}" == "true" ]]; then
44+
METADATA_PREFIX="fips."
45+
echo "Using FIPS metadata prefix: ${METADATA_PREFIX}"
46+
fi
47+
export ELASTICSEARCH_HOST=$(buildkite-agent meta-data get "${METADATA_PREFIX}es.host")
48+
export ELASTICSEARCH_USERNAME=$(buildkite-agent meta-data get "${METADATA_PREFIX}es.username")
49+
export ELASTICSEARCH_PASSWORD=$(buildkite-agent meta-data get "${METADATA_PREFIX}es.pwd")
50+
export KIBANA_HOST=$(buildkite-agent meta-data get "${METADATA_PREFIX}kibana.host")
51+
export KIBANA_USERNAME=$(buildkite-agent meta-data get "${METADATA_PREFIX}kibana.username")
52+
export KIBANA_PASSWORD=$(buildkite-agent meta-data get "${METADATA_PREFIX}kibana.pwd")
53+
export INTEGRATIONS_SERVER_HOST=$(buildkite-agent meta-data get "${METADATA_PREFIX}integrations_server.host")
54+
echo "Elasticsearch Host: ${ELASTICSEARCH_HOST}"
4955
fi
5056

5157
# Run integration tests

.github/workflows/bump-beats-version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
uses: elastic/oblt-actions/updatecli/run@v1
5757
with:
5858
command: apply --config .ci/updatecli/update-beats.yml --values .ci/updatecli/values.d/scm.yml
59+
version-file: .updatecli-version
5960
env:
6061
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6162
BRANCH_NAME: ${{ matrix.branch }}

.github/workflows/bump-golang.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,16 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- name: Install Updatecli in the runner
25-
uses: updatecli/updatecli-action@1536e372d5f433385f11b5b133b23a9833c510ce # 2.86.0
26-
27-
- name: Run Updatecli in Apply mode
28-
run: updatecli apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml
24+
- uses: elastic/oblt-actions/updatecli/run@v1
25+
with:
26+
command: apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml
27+
version-file: .updatecli-version
2928
env:
3029
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3130

3231
- if: ${{ failure() }}
33-
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
32+
uses: elastic/oblt-actions/slack/send@v1
3433
with:
35-
method: chat.postMessage
36-
token: ${{ secrets.SLACK_BOT_TOKEN }}
37-
payload: |
38-
{
39-
"channel": "#ingest-notifications",
40-
"text": "${{ env.SLACK_MESSAGE }}",
41-
"blocks": [
42-
{
43-
"type": "section",
44-
"text": {
45-
"type": "mrkdwn",
46-
"text": "${{ env.SLACK_MESSAGE }}"
47-
}
48-
}
49-
]
50-
}
51-
env:
52-
SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"
34+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
35+
channel-id: "#ingest-notifications"
36+
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"

.github/workflows/bump-otel-version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
uses: elastic/oblt-actions/updatecli/run@v1
4040
with:
4141
command: apply --config .ci/updatecli/update-otel.yml --values .ci/updatecli/values.d/scm.yml
42+
version-file: .updatecli-version
4243
env:
4344
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4445
BRANCH_NAME: ${{ matrix.branch }}

.github/workflows/bump-vm-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
- uses: elastic/oblt-actions/updatecli/run@v1
5353
with:
5454
command: apply --config .ci/updatecli/updatecli-bump-vm-images.yml --values .ci/updatecli/values.d/scm.yml
55+
version-file: .updatecli-version
5556
env:
5657
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5758
BRANCH_NAME: ${{ matrix.branch }}

.github/workflows/updatecli-compose.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,22 @@ jobs:
2828
- uses: elastic/oblt-actions/updatecli/run@v1
2929
with:
3030
command: --experimental compose diff
31+
version-file: .updatecli-version
3132
env:
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3334

3435
- uses: elastic/oblt-actions/updatecli/run@v1
3536
with:
3637
command: --experimental compose apply
38+
version-file: .updatecli-version
3739
env:
3840
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3941

4042
- if: ${{ failure() }}
41-
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
42-
with:
43-
method: chat.postMessage
44-
token: ${{ secrets.SLACK_BOT_TOKEN }}
45-
payload: |
46-
{
47-
"channel": "#ingest-notifications",
48-
"text": "${{ env.SLACK_MESSAGE }}",
49-
"blocks": [
50-
{
51-
"type": "section",
52-
"text": {
53-
"type": "mrkdwn",
54-
"text": "${{ env.SLACK_MESSAGE }}"
55-
}
56-
}
57-
]
58-
}
43+
uses: elastic/oblt-actions/slack/send@v1
5944
env:
60-
SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"
45+
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
46+
with:
47+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
48+
channel-id: "#ingest-notifications"
49+
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"

0 commit comments

Comments
 (0)