Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into add-beats-tests-to-…
Browse files Browse the repository at this point in the history
…serverless
  • Loading branch information
fearful-symmetry committed Nov 10, 2023
2 parents 72567f4 + 3155ea9 commit 48d7ea2
Show file tree
Hide file tree
Showing 55 changed files with 1,371 additions and 703 deletions.
224 changes: 131 additions & 93 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,97 +4,138 @@ env:
VAULT_PATH: "kv/ci-shared/observability-ingest/cloud/gcp"
DOCKER_REGISTRY: "docker.elastic.co"
steps:
- label: "Unit tests - Ubuntu 22.04"
key: "unit-tests-2204"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
image: "family/core-ubuntu-2204"
retry:
manual:
allowed: true
- group: "Unit tests"
key: "unit-tests"
steps:
- label: "Unit tests - Ubuntu 22.04"
key: "unit-tests-2204"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
image: "family/core-ubuntu-2204"
retry:
manual:
allowed: true

- label: "Unit tests - Ubuntu 22.04 ARM64"
key: "unit-tests-2204-arm64"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "aws"
imagePrefix: "core-ubuntu-2204-aarch64"
diskSizeGb: 200
instanceType: "m6g.4xlarge"
retry:
manual:
allowed: true
- label: "Unit tests - Ubuntu 22.04 ARM64"
key: "unit-tests-2204-arm64"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "aws"
imagePrefix: "core-ubuntu-2204-aarch64"
diskSizeGb: 200
instanceType: "m6g.xlarge"
retry:
manual:
allowed: true

- label: "Unit tests - Windows 2022"
key: "unit-tests-win2022"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
image: "family/core-windows-2022"
machine_type: "n2-standard-8"
disk_size: 200
disk_type: "pd-ssd"
retry:
manual:
allowed: true
- label: "Unit tests - Windows 2022"
key: "unit-tests-win2022"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
image: "family/core-windows-2022"
machine_type: "n2-standard-8"
disk_size: 200
disk_type: "pd-ssd"
retry:
manual:
allowed: true

- label: "Unit tests - Windows 2016"
key: "unit-tests-win2016"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
image: "family/core-windows-2016"
machine_type: "n2-standard-8"
disk_size: 200
disk_type: "pd-ssd"
retry:
manual:
allowed: true
- label: "Unit tests - Windows 2016"
key: "unit-tests-win2016"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
image: "family/core-windows-2016"
machine_type: "n2-standard-8"
disk_size: 200
disk_type: "pd-ssd"
retry:
manual:
allowed: true

- label: "Unit tests - MacOS 13 ARM"
key: "unit-tests-macos-13-arm"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: orka
imagePrefix: generic-13-ventura-arm
retry:
manual:
allowed: true
# Runs inly on the main branch
- label: "Unit tests - MacOS 13 ARM"
key: "unit-tests-macos-13-arm"
command: ".buildkite/scripts/steps/unit-tests.sh"
branches: main
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: orka
imagePrefix: generic-13-ventura-arm
retry:
manual:
allowed: true

- label: "Unit tests - MacOS 13"
key: "unit-tests-macos-13"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: orka
imagePrefix: generic-13-ventura-x64
retry:
manual:
allowed: true
- label: "Unit tests - MacOS 13"
key: "unit-tests-macos-13"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: orka
imagePrefix: generic-13-ventura-x64
retry:
manual:
allowed: true

- group: "Desktop Windows tests"
key: "extended-windows"
steps:
- label: "Unit tests - Windows 10"
key: "unit-tests-win10"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
# TODO create own image
image: "family/endpoint-windows-10-tester-rel"
machine_type: "n2-standard-8"
disk_type: "pd-ssd"
retry:
manual:
allowed: true
- label: "Unit tests - Windows 11"
key: "unit-tests-win11"
command: ".\\.buildkite\\scripts\\steps\\unit-tests.ps1"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
- "coverage.out"
agents:
provider: "gcp"
# TODO create own image
image: "family/endpoint-windows-11-tester-rel"
machine_type: "n2-standard-8"
disk_type: "pd-ssd"
retry:
manual:
allowed: true

- label: "Merge coverage reports"
key: "merge-coverage"
Expand All @@ -107,19 +148,16 @@ steps:
unit-tests-win2016
unit-tests-win2022
unit-tests-macos-13
unit-tests-macos-13-arm
unit-tests-win10
unit-tests-win11
"
artifact_paths:
- "build/TEST-**"
agents:
image: "golang:1.20.10"
depends_on:
- unit-tests-2204
- unit-tests-2204-arm64
- unit-tests-win2022
- unit-tests-win2016
- unit-tests-macos-13
- unit-tests-macos-13-arm
- unit-tests
- extended-windows
allow_dependency_failure: true

- group: "K8s tests"
Expand Down
62 changes: 1 addition & 61 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,67 +186,7 @@ pipeline {
}
}
}
}
stage('extended windows') {
when {
// Always when running builds on branches/tags
// Enable if extended windows support related changes.
beforeAgent true
anyOf {
not { changeRequest() }
expression { return isExtendedWindowsEnabled() && env.ONLY_DOCS == "false"}
}
}
failFast false
matrix {
agent {label "${PLATFORM} && windows-immutable"}
options { skipDefaultCheckout() }
axes {
axis {
name 'PLATFORM'
values 'windows-8', 'windows-10', 'windows-11'
}
}
stages {
stage('build'){
options { skipDefaultCheckout() }
steps {
withGithubNotify(context: "Build-${PLATFORM}") {
deleteDir()
unstashV2(name: 'source', bucket: "${JOB_GCS_BUCKET}", credentialsId: "${JOB_GCS_CREDENTIALS}")
withMageEnv(){
dir("${BASE_DIR}"){
cmd(label: 'Go build', script: 'mage build')
}
}
}
}
}
stage('Test') {
options { skipDefaultCheckout() }
steps {
withGithubNotify(context: "Test-${PLATFORM}") {
withMageEnv(){
dir("${BASE_DIR}"){
withEnv(["RACE_DETECTOR=true", "TEST_COVERAGE=${isCodeCoverageEnabled()}"]) {
cmd(label: 'Go unitTest', script: 'mage unitTest')
}
}
}
}
}
post {
always {
junit(allowEmptyResults: true, keepLongStdio: true, testResults: "${BASE_DIR}/build/TEST-*.xml")
whenTrue(isCodeCoverageEnabled()) {
coverageReport(baseDir: "**/build", reportFiles: 'TEST-go-unit.html', coverageFiles: 'TEST-go-unit-cov.xml')
}
}
}
}
}
}
}
}
}
post {
cleanup {
Expand Down
Loading

0 comments on commit 48d7ea2

Please sign in to comment.