Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .buildkite/bk.integration-fips.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ env:
# This section is used to define the plugins that will be used in the pipeline.
# See https://buildkite.com/docs/pipelines/integrations/plugins/using#using-yaml-anchors-with-plugins
common:
- vault_ec_key_prod: &vault_ec_key_prod
- vault_ec_key_staging_frh_gov: &vault_ec_key_staging_frh_gov
elastic/vault-secrets#v0.1.0:
path: "kv/ci-shared/platform-ingest/platform-ingest-ec-prod"
path: "kv/ci-shared/platform-ingest/platform-ingest-ec-staging-gov"
field: "apiKey"
env_var: "EC_API_KEY"

Expand All @@ -23,7 +23,11 @@ steps:
env:
ASDF_TERRAFORM_VERSION: 1.9.2
FIPS: "true"
EC_ENDPOINT: "https://api.staging.elastic-gov.com"
ESS_REGION: "us-gov-east-1"
TF_VAR_deployment_template_id: "aws-general-purpose"
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}"
TF_VAR_docker_images_name_suffix: "-fips"
command: |
source .buildkite/scripts/steps/ess_start.sh
artifact_paths:
Expand All @@ -33,7 +37,7 @@ steps:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5"
useCustomGlobalHooks: true
plugins:
- *vault_ec_key_prod
- *vault_ec_key_staging_frh_gov

- group: "fips:Stateful:Ubuntu"
key: integration-tests-ubuntu-fips
Expand Down Expand Up @@ -61,7 +65,7 @@ steps:
image: "${IMAGE_UBUNTU_X86_64_FIPS}"
instanceType: "m5.2xlarge"
plugins:
- *vault_ec_key_prod
- *vault_ec_key_staging_frh_gov
matrix:
setup:
sudo:
Expand Down Expand Up @@ -91,7 +95,7 @@ steps:
image: "${IMAGE_UBUNTU_ARM64_FIPS}"
instanceType: "m6g.2xlarge"
plugins:
- *vault_ec_key_prod
- *vault_ec_key_staging_frh_gov
matrix:
setup:
sudo:
Expand All @@ -118,7 +122,7 @@ steps:
image: "${IMAGE_UBUNTU_X86_64_FIPS}"
instanceType: "m5.2xlarge"
plugins:
- *vault_ec_key_prod
- *vault_ec_key_staging_frh_gov

- label: ESS FIPS stack cleanup
depends_on:
Expand All @@ -132,7 +136,7 @@ steps:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5"
useCustomGlobalHooks: true
plugins:
- *vault_ec_key_prod
- *vault_ec_key_staging_frh_gov

- label: Aggregate test reports
depends_on:
Expand Down
8 changes: 7 additions & 1 deletion .buildkite/scripts/steps/ess_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ source .buildkite/scripts/steps/fleet.sh

STACK_VERSION="$(jq -r '.version' .package-version)"
STACK_BUILD_ID="$(jq -r '.stack_build_id' .package-version)"
if [[ "${FIPS:-false}" == "true" ]]; then
# FRH testing environment does not have same stack build IDs as CFT environment so
# we just go with the STACK_VERSION.
STACK_BUILD_ID=""
fi
ESS_REGION="${ESS_REGION:-gcp-us-west2}"

ess_up "$STACK_VERSION" "$STACK_BUILD_ID"
ess_up "$STACK_VERSION" "$STACK_BUILD_ID" "$ESS_REGION"

preinstall_fleet_packages

Expand Down
5 changes: 5 additions & 0 deletions .buildkite/scripts/steps/integration_tests_tf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ fi
# This file is managed by an automation (mage integration:UpdateAgentPackageVersion) that check if the snapshot is ready.
STACK_VERSION="$(jq -r '.version' .package-version)"
STACK_BUILD_ID="$(jq -r '.stack_build_id' .package-version)"
if [[ "${FIPS:-false}" == "true" ]]; then
# FRH testing environment does not have same stack build IDs as CFT environment so
# we just go with the STACK_VERSION.
STACK_BUILD_ID=""
fi

echo "~~~ Building test binaries"
mage build:testBinaries
Expand Down
12 changes: 9 additions & 3 deletions test_infra/ess/deployment.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ variable "kibana_docker_image" {
description = "Docker image override for kibana"
}

variable "docker_images_name_suffix" {
type = string
default = ""
description = "Suffix to append to the docker images names"
}

resource "random_uuid" "deployment_suffix" {
}

Expand All @@ -80,9 +86,9 @@ locals {
yamldecode(file("${path.module}/../../pkg/testing/ess/create_deployment_csp_configuration.yaml")))

images_version = coalesce(var.stack_build_id, var.stack_version)
integration_server_docker_image = coalesce(var.integration_server_docker_image, local.ess_properties.docker.integration_server_image, "docker.elastic.co/cloud-release/elastic-agent-cloud:${local.images_version}")
elasticsearch_docker_image = coalesce(var.elasticsearch_docker_image, local.ess_properties.docker.elasticsearch_image, "docker.elastic.co/cloud-release/elasticsearch-cloud-ess:${local.images_version}")
kibana_docker_image = coalesce(var.kibana_docker_image, local.ess_properties.docker.kibana_image, "docker.elastic.co/cloud-release/kibana-cloud:${local.images_version}")
integration_server_docker_image = coalesce(var.integration_server_docker_image, local.ess_properties.docker.integration_server_image, "docker.elastic.co/cloud-release/elastic-agent-cloud${var.docker_images_name_suffix}:${local.images_version}")
elasticsearch_docker_image = coalesce(var.elasticsearch_docker_image, local.ess_properties.docker.elasticsearch_image, "docker.elastic.co/cloud-release/elasticsearch-cloud-ess${var.docker_images_name_suffix}:${local.images_version}")
kibana_docker_image = coalesce(var.kibana_docker_image, local.ess_properties.docker.kibana_image, "docker.elastic.co/cloud-release/kibana-cloud${var.docker_images_name_suffix}:${local.images_version}")
}

# If we have defined a stack version, validate that this version exists on that region and return it.
Expand Down
Loading