-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
254 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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 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,5 +1,45 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
|
||
env: | ||
IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2204" | ||
IMAGE_UBUNTU_ARM_64: "core-ubuntu-2004-aarch64" | ||
GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8" | ||
GCP_HI_PERF_MASHINE_TYPE: "c2d-highcpu-16" | ||
GCP_WIN_MACHINE_TYPE: "n2-standard-8" | ||
AWS_ARM_INSTANCE_TYPE: "t4g.xlarge" | ||
BEATS_PROJECT_NAME: "libbeat" | ||
|
||
steps: | ||
- label: "Example test" | ||
command: echo "Hello!" | ||
|
||
- input: "Input Parameters" | ||
key: "input-run-all-stages" | ||
fields: | ||
- select: "Libbeat - runLibbeat" | ||
key: "runLibbeat" | ||
options: | ||
- label: "True" | ||
value: "true" | ||
- label: "False" | ||
value: "false" | ||
default: "false" | ||
- select: "Libbeat - runLibBeatArmTest" | ||
key: "runLibBeatArmTest" | ||
options: | ||
- label: "True" | ||
value: "true" | ||
- label: "False" | ||
value: "false" | ||
default: "false" | ||
if: "build.source == 'ui'" | ||
|
||
- wait: ~ | ||
if: "build.source == 'ui'" | ||
allow_dependency_failure: false | ||
|
||
- label: ":linux: Load dynamic Libbeat pipeline" | ||
key: "libbeat-pipeline" | ||
command: ".buildkite/scripts/generate_libbeat_pipeline.sh" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_DEFAULT_MACHINE_TYPE}" |
This file contains 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 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 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,89 @@ | ||
#!/usr/bin/env bash | ||
|
||
source .buildkite/scripts/common.sh | ||
|
||
set -euo pipefail | ||
|
||
pipelineName="pipeline.libbeat-dynamic.yml" | ||
|
||
echo "Add the mandatory and extended tests without additional conditions into the pipeline" | ||
if are_conditions_met_mandatory_tests; then | ||
cat > $pipelineName <<- YAML | ||
steps: | ||
- group: "Mandatory Tests" | ||
key: "mandatory-tests" | ||
steps: | ||
- label: ":linux: Ubuntu Unit Tests" | ||
key: "mandatory-linux-unit-test" | ||
command: ".buildkite/scripts/unit_tests.sh" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_DEFAULT_MACHINE_TYPE}" | ||
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.xml" | ||
- label: ":go: Go Integration Tests" | ||
key: "mandatory-int-test" | ||
command: ".buildkite/scripts/go_int_tests.sh" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MASHINE_TYPE}" | ||
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.xml" | ||
- label: ":python: Python Integration Tests" | ||
key: "mandatory-python-int-test" | ||
command: ".buildkite/scripts/py_int_tests.sh" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MASHINE_TYPE}" | ||
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.xml" | ||
- label: ":negative_squared_cross_mark: Cross compile" | ||
key: "mandatory-cross-compile" | ||
command: ".buildkite/scripts/crosscompile.sh" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MASHINE_TYPE}" | ||
artifact_paths: " ${BEATS_PROJECT_NAME}/build/*.xml" | ||
- label: ":testengine: Stress Tests" | ||
key: "mandatory-stress-test" | ||
command: ".buildkite/scripts/stress_tests.sh" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_DEFAULT_MACHINE_TYPE}" | ||
artifact_paths: "${BEATS_PROJECT_NAME}/libbeat-stress-test.xml" | ||
YAML | ||
fi | ||
|
||
echo "Check and add the Extended Tests into the pipeline" | ||
if are_conditions_met_libbeat_arm_tests; then | ||
cat >> $pipelineName <<- YAML | ||
- group: "Extended Tests" | ||
key: "extended-tests" | ||
steps: | ||
- label: ":linux: Arm64 Unit Tests" | ||
key: "extended-arm64-unit-tests" | ||
command: ".buildkite/scripts/unit_tests.sh" | ||
agents: | ||
provider: "aws" | ||
imagePrefix: "${IMAGE_UBUNTU_ARM_64}" | ||
instanceType: "${AWS_ARM_INSTANCE_TYPE}" | ||
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.xml" | ||
YAML | ||
fi | ||
|
||
echo "--- Printing dynamic steps" #TODO: remove if the pipeline is public | ||
cat $pipelineName | ||
|
||
echo "--- Loading dynamic steps" | ||
buildkite-agent pipeline upload $pipelineName |
Oops, something went wrong.