|
| 1 | +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json |
| 2 | + |
| 3 | +env: |
| 4 | + DOCKER_REGISTRY: "docker.elastic.co" |
| 5 | + ASDF_MAGE_VERSION: 1.14.0 |
| 6 | + |
| 7 | + IMAGE_UBUNTU_2404_X86_64: "platform-ingest-elastic-agent-ubuntu-2404-1749258065" |
| 8 | + IMAGE_UBUNTU_X86_64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-1748955449" |
| 9 | + IMAGE_UBUNTU_ARM64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-aarch64-1748955449" |
| 10 | + |
| 11 | +steps: |
| 12 | + - label: Build and push custom elastic-agent image |
| 13 | + depends_on: |
| 14 | + - 'packaging-containers-x86-64-fips' # Reuse artifacts produced in .buildkite/integration.pipeline.yml |
| 15 | + key: integration-fips-cloud-image |
| 16 | + env: |
| 17 | + FIPS: "true" |
| 18 | + CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" |
| 19 | + CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" |
| 20 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" |
| 21 | + command: | |
| 22 | + buildkite-agent artifact download build/distributions/elastic-agent-fips-cloud-*-linux-amd64.docker.tar.gz . --step 'packaging-containers-x86-64-fips' |
| 23 | + mage cloud:load |
| 24 | + mage cloud:push |
| 25 | + agents: |
| 26 | + provider: "gcp" |
| 27 | + machineType: "n1-standard-8" |
| 28 | + image: "${IMAGE_UBUNTU_2404_X86_64}" |
| 29 | + |
| 30 | + - label: Start ESS stack for FIPS integration tests |
| 31 | + key: integration-fips-ess |
| 32 | + depends_on: |
| 33 | + - integration-fips-cloud-image |
| 34 | + env: |
| 35 | + ASDF_TERRAFORM_VERSION: 1.9.2 |
| 36 | + CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" |
| 37 | + CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" |
| 38 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" |
| 39 | + command: | |
| 40 | + source .buildkite/scripts/steps/ess_start.sh |
| 41 | + artifact_paths: |
| 42 | + - test_infra/ess/*.tfstate |
| 43 | + - test_infra/ess/*.lock.hcl |
| 44 | + agents: |
| 45 | + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" |
| 46 | + useCustomGlobalHooks: true |
| 47 | + |
| 48 | + - group: "fips:Stateful:Ubuntu" |
| 49 | + key: integration-tests-ubuntu-fips |
| 50 | + depends_on: |
| 51 | + - integration-fips-ess |
| 52 | + steps: |
| 53 | + - label: "fips:x86_64:sudo-{{matrix.sudo}}:{{matrix.groups}}" |
| 54 | + depends_on: |
| 55 | + - packaging-ubuntu-x86-64-fips # Reuse artifacts produced in .buildkite/integration.pipeline.yml |
| 56 | + env: |
| 57 | + FIPS: "true" |
| 58 | + CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" |
| 59 | + CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" |
| 60 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" |
| 61 | + command: | |
| 62 | + buildkite-agent artifact download build/distributions/** . --step 'packaging-ubuntu-x86-64-fips' |
| 63 | + .buildkite/scripts/steps/integration_tests_tf.sh {{matrix.groups}} {{matrix.sudo}} |
| 64 | + artifact_paths: |
| 65 | + - build/** |
| 66 | + - build/diagnostics/** |
| 67 | + retry: |
| 68 | + automatic: |
| 69 | + limit: 1 |
| 70 | + agents: |
| 71 | + provider: "aws" |
| 72 | + image: "${IMAGE_UBUNTU_X86_64_FIPS}" |
| 73 | + instanceType: "m5.2xlarge" |
| 74 | + matrix: |
| 75 | + setup: |
| 76 | + sudo: |
| 77 | + - "false" |
| 78 | + - "true" |
| 79 | + groups: |
| 80 | + - fleet # currently there is only a single test in the fleet group, add more tests once they have been defined |
| 81 | + |
| 82 | + - label: "fips:arm64:sudo-{{matrix.sudo}}:{{matrix.groups}}" |
| 83 | + depends_on: |
| 84 | + - packaging-ubuntu-arm64-fips |
| 85 | + env: |
| 86 | + FIPS: "true" |
| 87 | + CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" |
| 88 | + CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" |
| 89 | + TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" |
| 90 | + command: | |
| 91 | + buildkite-agent artifact download build/distributions/** . --step 'packaging-ubuntu-arm64-fips' |
| 92 | + .buildkite/scripts/steps/integration_tests_tf.sh {{matrix.groups}} {{matrix.sudo}} |
| 93 | + artifact_paths: |
| 94 | + - build/** |
| 95 | + - build/diagnostics/** |
| 96 | + retry: |
| 97 | + automatic: |
| 98 | + limit: 1 |
| 99 | + agents: |
| 100 | + provider: "aws" |
| 101 | + image: "${IMAGE_UBUNTU_ARM64_FIPS}" |
| 102 | + instanceType: "m6g.2xlarge" |
| 103 | + matrix: |
| 104 | + setup: |
| 105 | + sudo: |
| 106 | + - "false" |
| 107 | + - "true" |
| 108 | + groups: |
| 109 | + - fleet |
| 110 | + |
| 111 | + - label: ESS FIPS stack cleanup |
| 112 | + depends_on: |
| 113 | + - integration-tests-ubuntu-fips |
| 114 | + allow_dependency_failure: true |
| 115 | + command: | |
| 116 | + buildkite-agent artifact download "test_infra/ess/**" . --step "integration-fips-ess" |
| 117 | + ls -lah test_infra/ess |
| 118 | + .buildkite/scripts/steps/ess_down.sh |
| 119 | + agents: |
| 120 | + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" |
| 121 | + useCustomGlobalHooks: true |
| 122 | + |
| 123 | + - label: Aggregate test reports |
| 124 | + depends_on: |
| 125 | + - integration-tests-ubuntu-fips |
| 126 | + allow_dependency_failure: true |
| 127 | + command: | |
| 128 | + buildkite-agent artifact download "build/*.xml" . |
| 129 | + agents: |
| 130 | + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" |
| 131 | + useCustomGlobalHooks: true |
| 132 | + soft_fail: |
| 133 | + - exit_status: "*" |
| 134 | + plugins: |
| 135 | + - elastic/vault-secrets#v0.1.0: |
| 136 | + path: "kv/ci-shared/platform-ingest/buildkite_analytics_token" |
| 137 | + field: "token" |
| 138 | + env_var: "BUILDKITE_ANALYTICS_TOKEN" |
| 139 | + - test-collector#v1.11.0: |
| 140 | + files: "build/*.xml" |
| 141 | + format: "junit" |
| 142 | + branches: "main" |
| 143 | + debug: true |
0 commit comments