|
| 1 | +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json |
| 2 | + |
| 3 | +env: |
| 4 | + ASDF_MAGE_VERSION: 1.14.0 |
| 5 | + MS_GOTOOLCHAIN_TELEMETRY_ENABLED: "0" |
| 6 | + |
| 7 | + IMAGE_UBUNTU_2404_X86_64: "platform-ingest-elastic-agent-ubuntu-2404-1751072471" |
| 8 | + IMAGE_UBUNTU_X86_64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-1751072471" |
| 9 | + IMAGE_UBUNTU_ARM64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-aarch64-1751072471" |
| 10 | + # Remove AGENT_VERSION pinning once 9.2.0 DRA and stack are released |
| 11 | + AGENT_VERSION: "9.1.0-SNAPSHOT" |
| 12 | + |
| 13 | +# This section is used to define the plugins that will be used in the pipeline. |
| 14 | +# See https://buildkite.com/docs/pipelines/integrations/plugins/using#using-yaml-anchors-with-plugins |
| 15 | +common: |
| 16 | + - vault_ec_key_prod: &vault_ec_key_prod |
| 17 | + elastic/vault-secrets#v0.1.0: |
| 18 | + path: "kv/ci-shared/platform-ingest/platform-ingest-ec-prod" |
| 19 | + field: "apiKey" |
| 20 | + env_var: "EC_API_KEY" |
| 21 | + |
| 22 | +steps: |
| 23 | + - label: Build and push custom elastic-agent image |
| 24 | + depends_on: |
| 25 | + - 'packaging-containers-x86-64-fips' # Reuse artifacts produced in .buildkite/integration.pipeline.yml |
| 26 | + key: integration-fips-cloud-image |
| 27 | + env: |
| 28 | + FIPS: "true" |
| 29 | + CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" |
| 30 | + CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips" |
| 31 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}" |
| 32 | + command: | |
| 33 | + buildkite-agent artifact download build/distributions/elastic-agent-cloud-fips-*-linux-amd64.docker.tar.gz . --step 'packaging-containers-x86-64-fips' |
| 34 | + mage cloud:load |
| 35 | + mage cloud:push |
| 36 | + agents: |
| 37 | + provider: "gcp" |
| 38 | + machineType: "n1-standard-8" |
| 39 | + image: "${IMAGE_UBUNTU_2404_X86_64}" |
| 40 | + plugins: |
| 41 | + - elastic/vault-docker-login#v0.5.2: |
| 42 | + secret_path: 'kv/ci-shared/platform-ingest/elastic_docker_registry' |
| 43 | + |
| 44 | + - label: Start ESS stack for FIPS integration tests |
| 45 | + key: integration-fips-ess |
| 46 | + depends_on: |
| 47 | + - integration-fips-cloud-image |
| 48 | + env: |
| 49 | + ASDF_TERRAFORM_VERSION: 1.9.2 |
| 50 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}" |
| 51 | + command: | |
| 52 | + source .buildkite/scripts/steps/ess_start.sh |
| 53 | + artifact_paths: |
| 54 | + - test_infra/ess/*.tfstate |
| 55 | + - test_infra/ess/*.lock.hcl |
| 56 | + agents: |
| 57 | + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" |
| 58 | + useCustomGlobalHooks: true |
| 59 | + plugins: |
| 60 | + - *vault_ec_key_prod |
| 61 | + |
| 62 | + - group: "fips:Stateful:Ubuntu" |
| 63 | + key: integration-tests-ubuntu-fips |
| 64 | + depends_on: |
| 65 | + - integration-fips-ess |
| 66 | + steps: |
| 67 | + - label: "fips:x86_64:sudo-{{matrix.sudo}}:{{matrix.groups}}" |
| 68 | + depends_on: |
| 69 | + - packaging-ubuntu-x86-64-fips # Reuse artifacts produced in .buildkite/integration.pipeline.yml |
| 70 | + env: |
| 71 | + FIPS: "true" |
| 72 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}" |
| 73 | + TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess" |
| 74 | + command: | |
| 75 | + buildkite-agent artifact download build/distributions/** . --step 'packaging-ubuntu-x86-64-fips' |
| 76 | + .buildkite/scripts/steps/integration_tests_tf.sh {{matrix.groups}} {{matrix.sudo}} |
| 77 | + artifact_paths: |
| 78 | + - build/** |
| 79 | + - build/diagnostics/** |
| 80 | + retry: |
| 81 | + automatic: |
| 82 | + limit: 1 |
| 83 | + agents: |
| 84 | + provider: "aws" |
| 85 | + image: "${IMAGE_UBUNTU_X86_64_FIPS}" |
| 86 | + instanceType: "m5.2xlarge" |
| 87 | + plugins: |
| 88 | + - *vault_ec_key_prod |
| 89 | + matrix: |
| 90 | + setup: |
| 91 | + sudo: |
| 92 | + - "false" |
| 93 | + - "true" |
| 94 | + groups: |
| 95 | + - fleet # currently there is only a single test in the fleet group, add more tests once they have been defined |
| 96 | + |
| 97 | + - label: "fips:arm64:sudo-{{matrix.sudo}}:{{matrix.groups}}" |
| 98 | + depends_on: |
| 99 | + - packaging-ubuntu-arm64-fips |
| 100 | + env: |
| 101 | + FIPS: "true" |
| 102 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}" |
| 103 | + TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess" |
| 104 | + command: | |
| 105 | + buildkite-agent artifact download build/distributions/** . --step 'packaging-ubuntu-arm64-fips' |
| 106 | + .buildkite/scripts/steps/integration_tests_tf.sh {{matrix.groups}} {{matrix.sudo}} |
| 107 | + artifact_paths: |
| 108 | + - build/** |
| 109 | + - build/diagnostics/** |
| 110 | + retry: |
| 111 | + automatic: |
| 112 | + limit: 1 |
| 113 | + agents: |
| 114 | + provider: "aws" |
| 115 | + image: "${IMAGE_UBUNTU_ARM64_FIPS}" |
| 116 | + instanceType: "m6g.2xlarge" |
| 117 | + plugins: |
| 118 | + - *vault_ec_key_prod |
| 119 | + matrix: |
| 120 | + setup: |
| 121 | + sudo: |
| 122 | + - "false" |
| 123 | + - "true" |
| 124 | + groups: |
| 125 | + - fleet |
| 126 | + |
| 127 | + - label: "fips:upgrade-ech-deployment" |
| 128 | + if: build.env("BUILDKITE_PULL_REQUEST") != "false" && build.env("GITHUB_PR_LABELS") =~ /.*(Testing:run:TestUpgradeIntegrationsServer).*/ |
| 129 | + env: |
| 130 | + FIPS: "true" |
| 131 | + TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess" |
| 132 | + command: | |
| 133 | + export EC_API_KEY=$(retry -t 5 -- vault kv get -field=apiKey kv/ci-shared/platform-ingest/platform-ingest-ec-prod) |
| 134 | + .buildkite/scripts/buildkite-integration-tests.sh ech-deployment false |
| 135 | + artifact_paths: |
| 136 | + - build/** |
| 137 | + - build/diagnostics/** |
| 138 | + retry: |
| 139 | + automatic: |
| 140 | + limit: 1 |
| 141 | + agents: |
| 142 | + provider: "aws" |
| 143 | + image: "${IMAGE_UBUNTU_X86_64_FIPS}" |
| 144 | + instanceType: "m5.2xlarge" |
| 145 | + |
| 146 | + - label: ESS FIPS stack cleanup |
| 147 | + depends_on: |
| 148 | + - integration-tests-ubuntu-fips |
| 149 | + allow_dependency_failure: true |
| 150 | + command: | |
| 151 | + buildkite-agent artifact download "test_infra/ess/**" . --step "integration-fips-ess" |
| 152 | + ls -lah test_infra/ess |
| 153 | + .buildkite/scripts/steps/ess_down.sh |
| 154 | + agents: |
| 155 | + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" |
| 156 | + useCustomGlobalHooks: true |
| 157 | + plugins: |
| 158 | + - *vault_ec_key_prod |
| 159 | + |
| 160 | + - label: Aggregate test reports |
| 161 | + depends_on: |
| 162 | + - integration-tests-ubuntu-fips |
| 163 | + allow_dependency_failure: true |
| 164 | + command: | |
| 165 | + buildkite-agent artifact download "build/*.xml" . |
| 166 | + agents: |
| 167 | + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" |
| 168 | + useCustomGlobalHooks: true |
| 169 | + soft_fail: |
| 170 | + - exit_status: "*" |
| 171 | + plugins: |
| 172 | + - elastic/vault-secrets#v0.1.0: |
| 173 | + path: "kv/ci-shared/platform-ingest/buildkite_analytics_token" |
| 174 | + field: "token" |
| 175 | + env_var: "BUILDKITE_ANALYTICS_TOKEN" |
| 176 | + - test-collector#v1.11.0: |
| 177 | + files: "build/*.xml" |
| 178 | + format: "junit" |
| 179 | + branches: "main" |
| 180 | + debug: true |
0 commit comments