Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feat/custom-mockes
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall committed Oct 29, 2024
2 parents f3efa07 + 934a81d commit bc81fad
Show file tree
Hide file tree
Showing 185 changed files with 23,302 additions and 14,307 deletions.
160 changes: 160 additions & 0 deletions .buildkite/bk.integration.pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json

env:
DOCKER_REGISTRY: "docker.elastic.co"
VAULT_PATH: "kv/ci-shared/observability-ingest/cloud/gcp"
ASDF_MAGE_VERSION: 1.14.0
ASDF_GOLANG_VERSION: 1.22.6
ASDF_TERRAFORM_VERSION: 1.9.2

steps:
- label: "Integration tests: packaging"
key: "package-it"
command: ".buildkite/scripts/steps/integration-package.sh"
artifact_paths:
- build/distributions/**
agents:
provider: "gcp"
machineType: "n1-standard-8"

- label: Start ESS stack for integration tests
key: integration-ess
depends_on:
- package-it
command: |
#!/usr/bin/env bash
set -euo pipefail
source .buildkite/scripts/steps/ess_start.sh
artifact_paths:
- test_infra/ess/*.tfstate
- test_infra/ess/*.lock.hcl
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5"
useCustomGlobalHooks: true

- group: "Stateful IT (Sudo): Ubuntu"
key: integration-tests
depends_on:
- package-it
- integration-ess
steps:
- label: "Default"
key: stateful-ubuntu-default-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "default" "^(TestAPMConfig|TestDiagnosticsOptionalValues|TestIsolatedUnitsDiagnosticsOptionalValues|TestDiagnosticsCommand|TestIsolatedUnitsDiagnosticsCommand|TestEventLogFile|TestFakeComponent|TestFakeIsolatedUnitsComponent|TestOtelFileProcessing|TestOtelLogsIngestion|TestOtelAPMIngestion|TestPackageVersion)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: "Upgrade"
key: stateful-ubuntu-upgrade-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "upgrade" "^(TestUpgradeBrokenPackageVersion|TestStandaloneUpgradeWithGPGFallback|TestStandaloneUpgradeWithGPGFallbackOneRemoteFailing|TestStandaloneUpgradeRollback|TestStandaloneUpgradeRollbackOnRestarts|TestStandaloneUpgradeFailsWhenUpgradeIsInProgress|TestStandaloneUpgradeRetryDownload|TestStandaloneUpgradeSameCommit|TestStandaloneUpgrade|TestStandaloneUpgradeUninstallKillWatcher)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: "Fleet"
key: stateful-ubuntu-fleet-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
ls -lah build/distributions/
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "fleet" "^(TestLongRunningAgentForLeaks|TestDelayEnroll|TestDelayEnrollUnprivileged|TestInstallAndCLIUninstallWithEndpointSecurity|TestInstallAndUnenrollWithEndpointSecurity|TestInstallWithEndpointSecurityAndRemoveEndpointIntegration|TestEndpointSecurityNonDefaultBasePath|TestEndpointSecurityUnprivileged|TestEndpointSecurityCannotSwitchToUnprivileged|TestEndpointLogsAreCollectedInDiagnostics|TestForceInstallOverProtectedPolicy|TestSetLogLevelFleetManaged|TestLogIngestionFleetManaged|TestMetricsMonitoringCorrectBinaries|TestEndpointAgentServiceMonitoring|TestMonitoringPreserveTextConfig|TestMonitoringLivenessReloadable|TestComponentBuildHashInDiagnostics|TestProxyURL|TestFleetManagedUpgradeUnprivileged)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: "FQDN"
key: stateful-ubuntu-fqdn-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
ls -lah build/distributions/
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "fqdn" "^(TestFQDN)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: "Deb"
key: stateful-ubuntu-deb-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
ls -lah build/distributions/
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "deb" "^(TestDebLogIngestFleetManaged|TestDebFleetUpgrade)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: "Fleet Airgapped"
key: stateful-ubuntu-fleet-airgapped-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
ls -lah build/distributions/
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "fleet-airgapped" "^(TestFleetAirGappedUpgradeUnprivileged)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: "Fleet Privileged"
key: stateful-ubuntu-fleet-privileged-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
ls -lah build/distributions/
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "fleet-privileged" "^(TestInstallFleetServerBootstrap|TestFleetManagedUpgradePrivileged)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: "Fleet Airgapped Privileged"
key: stateful-ubuntu-fleet-airgapped-privileged-sudo
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
ls -lah build/distributions/
.buildkite/scripts/steps/integration_tests_tf_sudo.sh "fleet-airgapped-privileged" "^(TestFleetAirGappedUpgradePrivileged)$$"
artifact_paths:
- build/**
agents:
provider: "gcp"
imageProject: elastic-images-qa
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2204"

- label: ESS stack cleanup
depends_on: integration-tests
allow_dependency_failure: true
command: |
buildkite-agent artifact download "test_infra/ess/**" . --step "integration-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
3 changes: 1 addition & 2 deletions .buildkite/integration.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ steps:
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/beats_tests.sh
# if: "build.env('CRON') == 'yes'"
agents:
provider: "gcp"
machineType: "n1-standard-8"
Expand All @@ -107,7 +106,7 @@ steps:
key: "k8s-integration-tests"
env:
K8S_VERSION: "v1.31.0"
KIND_VERSION: "v0.20.0"
KIND_VERSION: "v0.24.0"
command: ".buildkite/scripts/steps/k8s-extended-tests.sh"
artifact_paths:
- "build/k8s-logs*/*"
Expand Down
87 changes: 53 additions & 34 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ steps:
key: "unit-tests-2204"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: "gcp"
image: "family/core-ubuntu-2204"
Expand All @@ -35,10 +35,10 @@ steps:
key: "unit-tests-2204-arm64"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: "aws"
imagePrefix: "core-ubuntu-2204-aarch64"
Expand All @@ -52,10 +52,10 @@ steps:
key: "unit-tests-win2022"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: "gcp"
image: "family/core-windows-2022"
Expand All @@ -70,10 +70,10 @@ steps:
key: "unit-tests-win2016"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: "gcp"
image: "family/core-windows-2016"
Expand All @@ -90,10 +90,10 @@ steps:
command: ".buildkite/scripts/steps/unit-tests.sh"
branches: main
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: orka
imagePrefix: generic-13-ventura-arm
Expand All @@ -105,10 +105,10 @@ steps:
key: "unit-tests-macos-13"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: orka
imagePrefix: generic-13-ventura-x64
Expand All @@ -123,10 +123,10 @@ steps:
key: "unit-tests-win10"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: "gcp"
# TODO create own image
Expand All @@ -140,10 +140,10 @@ steps:
key: "unit-tests-win11"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-go-unit.html"
- "build/TEST-go-unit.xml"
- "build/TEST-*.html"
- "build/TEST-*.xml"
- "build/diagnostics/*"
- "coverage.out"
- "coverage-*.out"
agents:
provider: "gcp"
# TODO create own image
Expand All @@ -154,20 +154,39 @@ steps:
manual:
allowed: true


- label: ":junit: Junit annotate"
plugins:
- junit-annotate#v2.5.0:
artifacts: "**TEST-*.xml"
always-annotate: true
agents:
provider: "gcp"
depends_on:
- step: "unit-tests-2204"
allow_failure: true
- step: "unit-tests-2204-arm64"
allow_failure: true
- step: "unit-tests-win2022"
allow_failure: true
- step: "unit-tests-win2016"
allow_failure: true
- step: "unit-tests-macos-13-arm"
allow_failure: true
- step: "unit-tests-macos-13"
allow_failure: true
- step: "unit-tests-win10"
allow_failure: true
- step: "unit-tests-win11"
allow_failure: true


- label: "Merge coverage reports"
key: "merge-coverage"
env:
BUILDKITE_REPO: ""
command: "
command: |
.buildkite/scripts/steps/merge.sh
unit-tests-2204
unit-tests-2204-arm64
unit-tests-win2016
unit-tests-win2022
unit-tests-macos-13
unit-tests-win10
unit-tests-win11
"
artifact_paths:
- "build/TEST-go-unit.cov"
agents:
Expand All @@ -184,7 +203,7 @@ steps:
- label: "K8s tests: {{matrix.k8s_version}}"
env:
K8S_VERSION: "v{{matrix.k8s_version}}"
KIND_VERSION: "v0.20.0"
KIND_VERSION: "v0.24.0"
command: ".buildkite/scripts/steps/k8s-tests.sh"
agents:
provider: "gcp"
Expand Down
Loading

0 comments on commit bc81fad

Please sign in to comment.