-
Notifications
You must be signed in to change notification settings - Fork 176
Add Pipeline to deploy custom agent image for FIPS testing #8035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
ea416ea
Add Pipeline to deploy custom agent image for FIPS testing
michel-laterman c9d4023
Add new pipeline as triggered step
michel-laterman f8d343b
Use normal bk agent
michel-laterman 46ec87a
Add bk agent provider and machinetype
michel-laterman cd7f72a
Add FIPS support to cloud:push
michel-laterman 3ae5f92
Fix magefile
michel-laterman b84b803
Merge branch 'main' into fips-ech
michel-laterman 838cdbd
Push image to beats-ci, add docker login hook
michel-laterman 7515f8f
Fix pipeline
michel-laterman 8ad48a3
Add FIPS env check to buildkite-integration-tests.sh
michel-laterman 0ace521
Remove integration.fips addition
michel-laterman 005746a
Merge branch 'main' into fips-ech
michel-laterman bd6119d
Fix label names
michel-laterman 85ae7fa
revert change to integration tests
michel-laterman 11b8ada
Pass FIPS
michel-laterman 3ddecb1
Merge branch 'main' into fips-ech
michel-laterman 775bd58
Add integration test with FIPS: true in requirements
michel-laterman 5fb8569
Remove extra test
michel-laterman bb16fc7
Merge branch 'main' into fips-ech
michel-laterman 9800591
Review feedback
michel-laterman 6ee1fde
Change to k8s testing 9.1.0, change to running test on aws FIPS enabl…
michel-laterman 878203f
Use ARM fips image
michel-laterman 628f05d
Merge branch 'main' into fips-ech
michel-laterman 68cc3cb
Fix pipeline
michel-laterman 74c7e0f
Merge branch 'main' into fips-ech
michel-laterman cd6c00a
Change to using imagePrefix for all images
michel-laterman 6f5dcfa
Remove FIPS k8s tests
michel-laterman 86621bb
Remove -integration.fips arg so standard tests run
michel-laterman 88900f8
Remove go from .tool-versions
michel-laterman 2e8f6a7
Reuse docker image from package step
michel-laterman f4f947b
Remove env tag from cloud:import
michel-laterman a96f408
Add verbosity to cloud import and push
michel-laterman 6eb8a2f
Change from image import to image load
michel-laterman 769ccf7
Use fully qualified images for buildkite
michel-laterman 3530c3c
Check for msft/go, fix fips test
michel-laterman f74a82a
Fix var name
michel-laterman 4fd6902
Update fips bk images
michel-laterman 796b4e4
Merge branch 'main' into fips-ech
michel-laterman 35c33f2
Remove additional logging
michel-laterman dc3a78d
fix passing integration.fips, define TF_VAR as pipeline variable
michel-laterman 3e6575a
imageName -> image
michel-laterman 0889b8a
Change test requirement order, remove extra groups
michel-laterman 4ae0723
Add log line to failing test
michel-laterman 2fef8eb
Apply suggestions from code review
michel-laterman 95dc6bb
Add comments for dependencies
michel-laterman 2debfd2
Merge remote-tracking branch 'origin/main' into fips-ech
michel-laterman 6381a61
step specific env vars
michel-laterman d90d974
Fix TF var
michel-laterman 362b17e
comment out agentStatus from test
michel-laterman c0be6f9
Update pipelines
michel-laterman 074832a
Merge branch 'main' into fips-ech
michel-laterman c3bfadd
Update .buildkite/bk.integration-fips.pipeline.yml
michel-laterman afb5d73
Merge branch 'main' into fips-ech
michel-laterman 8f6ff7a
Update .buildkite/bk.integration-fips.pipeline.yml
michel-laterman 645c8b6
Merge branch 'main' into fips-ech
michel-laterman 33647be
Merge branch 'main' into fips-ech
michel-laterman 19ebf48
Change bk instance where image is pushed
michel-laterman a2c3227
Update bk images, add to automation
michel-laterman 59fa434
Merge branch 'main' into fips-ech
michel-laterman 4ef376f
Remove key for aggregate-reports-fips
michel-laterman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
|
||
env: | ||
DOCKER_REGISTRY: "docker.elastic.co" | ||
ASDF_MAGE_VERSION: 1.14.0 | ||
|
||
IMAGE_UBUNTU_2404_X86_64: "platform-ingest-elastic-agent-ubuntu-2404-1749258065" | ||
IMAGE_UBUNTU_X86_64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-1748955449" | ||
IMAGE_UBUNTU_ARM64_FIPS: "platform-ingest-elastic-agent-ubuntu-2204-fips-aarch64-1748955449" | ||
michel-laterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
steps: | ||
- label: Build and push custom elastic-agent image | ||
depends_on: | ||
- 'packaging-containers-x86-64-fips' # Reuse artifacts produced in .buildkite/integration.pipeline.yml | ||
key: integration-fips-cloud-image | ||
env: | ||
FIPS: "true" | ||
CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" | ||
CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" | ||
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" | ||
command: | | ||
buildkite-agent artifact download build/distributions/elastic-agent-fips-cloud-*-linux-amd64.docker.tar.gz . --step 'packaging-containers-x86-64-fips' | ||
mage cloud:load | ||
mage cloud:push | ||
agents: | ||
provider: "gcp" | ||
machineType: "n1-standard-8" | ||
image: "${IMAGE_UBUNTU_2404_X86_64}" | ||
|
||
- label: Start ESS stack for FIPS integration tests | ||
key: integration-fips-ess | ||
depends_on: | ||
- integration-fips-cloud-image | ||
env: | ||
ASDF_TERRAFORM_VERSION: 1.9.2 | ||
CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" | ||
CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" | ||
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" | ||
michel-laterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
command: | | ||
source .buildkite/scripts/steps/ess_start.sh | ||
artifact_paths: | ||
- test_infra/ess/*.tfstate | ||
- test_infra/ess/*.lock.hcl | ||
michel-laterman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
agents: | ||
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" | ||
useCustomGlobalHooks: true | ||
|
||
- group: "fips:Stateful:Ubuntu" | ||
key: integration-tests-ubuntu-fips | ||
depends_on: | ||
- integration-fips-ess | ||
steps: | ||
- label: "fips:x86_64:sudo-{{matrix.sudo}}:{{matrix.groups}}" | ||
depends_on: | ||
- packaging-ubuntu-x86-64-fips # Reuse artifacts produced in .buildkite/integration.pipeline.yml | ||
env: | ||
FIPS: "true" | ||
CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" | ||
CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" | ||
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" | ||
command: | | ||
buildkite-agent artifact download build/distributions/** . --step 'packaging-ubuntu-x86-64-fips' | ||
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix.groups}} {{matrix.sudo}} | ||
artifact_paths: | ||
- build/** | ||
- build/diagnostics/** | ||
retry: | ||
automatic: | ||
limit: 1 | ||
agents: | ||
provider: "aws" | ||
image: "${IMAGE_UBUNTU_X86_64_FIPS}" | ||
instanceType: "m5.2xlarge" | ||
matrix: | ||
setup: | ||
sudo: | ||
- "false" | ||
- "true" | ||
groups: | ||
- fleet # currently there is only a single test in the fleet group, add more tests once they have been defined | ||
|
||
- label: "fips:arm64:sudo-{{matrix.sudo}}:{{matrix.groups}}" | ||
depends_on: | ||
- packaging-ubuntu-arm64-fips | ||
env: | ||
FIPS: "true" | ||
CUSTOM_IMAGE_TAG: "git-${BUILDKITE_COMMIT:0:12}" | ||
CI_ELASTIC_AGENT_DOCKER_IMAGE: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud" | ||
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-fips-cloud:git-${BUILDKITE_COMMIT:0:12}" | ||
command: | | ||
buildkite-agent artifact download build/distributions/** . --step 'packaging-ubuntu-arm64-fips' | ||
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix.groups}} {{matrix.sudo}} | ||
artifact_paths: | ||
- build/** | ||
- build/diagnostics/** | ||
retry: | ||
automatic: | ||
limit: 1 | ||
agents: | ||
provider: "aws" | ||
image: "${IMAGE_UBUNTU_ARM64_FIPS}" | ||
instanceType: "m6g.2xlarge" | ||
matrix: | ||
setup: | ||
sudo: | ||
- "false" | ||
- "true" | ||
groups: | ||
- fleet | ||
|
||
- label: ESS FIPS stack cleanup | ||
depends_on: | ||
- integration-tests-ubuntu-fips | ||
allow_dependency_failure: true | ||
command: | | ||
buildkite-agent artifact download "test_infra/ess/**" . --step "integration-fips-ess" | ||
ls -lah test_infra/ess | ||
.buildkite/scripts/steps/ess_down.sh | ||
agents: | ||
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" | ||
useCustomGlobalHooks: true | ||
|
||
- label: Aggregate test reports | ||
depends_on: | ||
- integration-tests-ubuntu-fips | ||
allow_dependency_failure: true | ||
command: | | ||
buildkite-agent artifact download "build/*.xml" . | ||
agents: | ||
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5" | ||
useCustomGlobalHooks: true | ||
soft_fail: | ||
- exit_status: "*" | ||
plugins: | ||
- elastic/vault-secrets#v0.1.0: | ||
path: "kv/ci-shared/platform-ingest/buildkite_analytics_token" | ||
field: "token" | ||
env_var: "BUILDKITE_ANALYTICS_TOKEN" | ||
- test-collector#v1.11.0: | ||
files: "build/*.xml" | ||
format: "junit" | ||
branches: "main" | ||
debug: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
mage 1.14.0 | ||
golang 1.24.0 | ||
terraform 1.9.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.