Skip to content

Commit

Permalink
full test
Browse files Browse the repository at this point in the history
  • Loading branch information
Siarhei Harbuz committed Mar 7, 2024
1 parent 6ff685b commit 9907579
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 110 deletions.
4 changes: 2 additions & 2 deletions .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ withModule() {
if are_paths_changed "${pattern[@]}" && ! are_changed_only_paths "${exclude[@]}"; then
export MODULE=${module_name}
elif [ -d "${module_path}" ]; then
export MODULE="aws" # TODO: remove this line and uncomment the line below when the issue with the loop (cycle) is solved
# export MODULE=''
export MODULE="aws" # TODO: remove this line and uncomment the line below when the issue https://github.com/elastic/ingest-dev/issues/2993 is solved
# export MODULE='' # TODO: uncomment the line when the issue https://github.com/elastic/ingest-dev/issues/2993 is solved
fi
echo "MODULE=$MODULE"
}
Expand Down
214 changes: 106 additions & 108 deletions .buildkite/scripts/generate_xpack_metricbeat_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ steps:
- group: "Mandatory Tests"
key: "mandatory-tests"
steps:
# - label: ":linux: Ubuntu Unit Tests"
# key: "mandatory-linux-unit-test"
# command: "cd $BEATS_PROJECT_NAME && mage build unitTest"
# agents:
# provider: "gcp"
# image: "${IMAGE_UBUNTU_X86_64}"
# machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
# artifact_paths: "${BEATS_PROJECT_NAME}/build/*.xml"
- label: ":linux: Ubuntu Unit Tests"
key: "mandatory-linux-unit-test"
command: "cd $BEATS_PROJECT_NAME && mage build unitTest"
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"
Expand Down Expand Up @@ -50,58 +50,58 @@ steps:
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.xml"
# - label: ":windows: Windows Unit Tests - {{matrix.image}}"
# command: ".buildkite/scripts/win_unit_tests.ps1"
# key: "mandatory-win-unit-tests"
# agents:
# provider: "gcp"
# image: "{{matrix.image}}"
# machineType: "${GCP_WIN_MACHINE_TYPE}"
# disk_size: 100
# disk_type: "pd-ssd"
# matrix:
# setup:
# image:
# - "${IMAGE_WIN_2016}"
# - "${IMAGE_WIN_2022}"
# artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
### TODO: this condition will be changed in the Phase 3 of the Migration Plan https://docs.google.com/document/d/1IPNprVtcnHlem-uyGZM0zGzhfUuFAh4LeSl9JFHMSZQ/edit#heading=h.sltz78yy249h
# - group: "Extended Windows Tests"
# key: "extended-win-tests"
# steps:
# - label: ":windows: Windows 10 Unit Tests"
# key: "extended-win-10-unit-tests"
# command: ".buildkite/scripts/win_unit_tests.ps1"
# agents:
# provider: "gcp"
# image: "${IMAGE_WIN_10}"
# machineType: "${GCP_WIN_MACHINE_TYPE}"
# disk_size: 100
# disk_type: "pd-ssd"
# artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
# - label: ":windows: Windows 11 Unit Tests"
# key: "extended-win-11-unit-tests"
# command: ".buildkite/scripts/win_unit_tests.ps1"
# agents:
# provider: "gcp"
# image: "${IMAGE_WIN_11}"
# machineType: "${GCP_WIN_MACHINE_TYPE}"
# disk_size: 100
# disk_type: "pd-ssd"
# artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
# - label: ":windows: Win 2019 Unit Tests"
# key: "extended-win-2019-unit-tests"
# command: ".buildkite/scripts/win_unit_tests.ps1"
# agents:
# provider: "gcp"
# image: "${IMAGE_WIN_2019}"
# machineType: "${GCP_WIN_MACHINE_TYPE}"
# disk_size: 100
# disk_type: "pd-ssd"
# artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
- label: ":windows: Windows Unit Tests - {{matrix.image}}"
command: ".buildkite/scripts/win_unit_tests.ps1"
key: "mandatory-win-unit-tests"
agents:
provider: "gcp"
image: "{{matrix.image}}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
matrix:
setup:
image:
- "${IMAGE_WIN_2016}"
- "${IMAGE_WIN_2022}"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
## TODO: this condition will be changed in the Phase 3 of the Migration Plan https://docs.google.com/document/d/1IPNprVtcnHlem-uyGZM0zGzhfUuFAh4LeSl9JFHMSZQ/edit#heading=h.sltz78yy249h
- group: "Extended Windows Tests"
key: "extended-win-tests"
steps:
- label: ":windows: Windows 10 Unit Tests"
key: "extended-win-10-unit-tests"
command: ".buildkite/scripts/win_unit_tests.ps1"
agents:
provider: "gcp"
image: "${IMAGE_WIN_10}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
- label: ":windows: Windows 11 Unit Tests"
key: "extended-win-11-unit-tests"
command: ".buildkite/scripts/win_unit_tests.ps1"
agents:
provider: "gcp"
image: "${IMAGE_WIN_11}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
- label: ":windows: Win 2019 Unit Tests"
key: "extended-win-2019-unit-tests"
command: ".buildkite/scripts/win_unit_tests.ps1"
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
YAML
else
Expand All @@ -121,21 +121,19 @@ if [[ are_conditions_met_aws_tests || are_conditions_met_macos_tests ]]; then
YAML
fi

# if are_conditions_met_macos_tests; then
# cat >> $pipelineName <<- YAML

# - label: ":mac: MacOS Unit Tests"
# key: "extended-macos-unit-tests"
# command: ".buildkite/scripts/unit_tests.sh"
# agents:
# provider: "orka"
# imagePrefix: "${IMAGE_MACOS_X86_64}"
# artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
if are_conditions_met_macos_tests; then
cat >> $pipelineName <<- YAML
# YAML
# fi
- label: ":mac: MacOS Unit Tests"
key: "extended-macos-unit-tests"
command: ".buildkite/scripts/unit_tests.sh"
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_X86_64}"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"
#TODO: uncomment the commented-out below step when issues mentioned in the PR https://github.com/elastic/beats/pull/38081 are resolved
YAML
fi

if are_conditions_met_aws_tests; then
cat >> $pipelineName <<- YAML
Expand All @@ -155,41 +153,41 @@ if are_conditions_met_aws_tests; then
YAML
fi

# echo "Check and add the Packaging into the pipeline"
# if are_conditions_met_packaging; then
# cat >> $pipelineName <<- YAML

# - wait: ~
# depends_on:
# - step: "mandatory-tests"
# allow_failure: false

# - group: "Packaging" # TODO: check conditions for future the main pipeline migration: https://github.com/elastic/beats/pull/28589
# key: "packaging"
# steps:
# - label: ":linux: Packaging Linux"
# key: "packaging-linux"
# command: "cd $BEATS_PROJECT_NAME && mage package"
# agents:
# provider: "gcp"
# image: "${IMAGE_UBUNTU_X86_64}"
# machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
# env:
# PLATFORMS: "${PACKAGING_PLATFORMS}"

# - label: ":linux: Packaging ARM"
# key: "packaging-arm"
# command: "cd $BEATS_PROJECT_NAME && mage package"
# agents:
# provider: "aws"
# imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
# instanceType: "${AWS_ARM_INSTANCE_TYPE}"
# env:
# PLATFORMS: "${PACKAGING_ARM_PLATFORMS}"
# PACKAGES: "docker"

# YAML
# fi
echo "Check and add the Packaging into the pipeline"
if are_conditions_met_packaging; then
cat >> $pipelineName <<- YAML
- wait: ~
depends_on:
- step: "mandatory-tests"
allow_failure: false
- group: "Packaging" # TODO: check conditions for future the main pipeline migration: https://github.com/elastic/beats/pull/28589
key: "packaging"
steps:
- label: ":linux: Packaging Linux"
key: "packaging-linux"
command: "cd $BEATS_PROJECT_NAME && mage package"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
env:
PLATFORMS: "${PACKAGING_PLATFORMS}"
- label: ":linux: Packaging ARM"
key: "packaging-arm"
command: "cd $BEATS_PROJECT_NAME && mage package"
agents:
provider: "aws"
imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
env:
PLATFORMS: "${PACKAGING_ARM_PLATFORMS}"
PACKAGES: "docker"
YAML
fi

echo "--- Printing dynamic steps" #TODO: remove if the pipeline is public
cat $pipelineName
Expand Down

0 comments on commit 9907579

Please sign in to comment.