Skip to content

Commit

Permalink
updated common.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Apr 18, 2024
1 parent 5e16f25 commit 000819a
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 30 deletions.
5 changes: 0 additions & 5 deletions .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ XPACK_MODULE_PATTERN="^x-pack\\/[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*"
# define if needed run the whole pipeline for the particular beat
[ -z "${run_filebeat+x}" ] && run_filebeat="$(buildkite-agent meta-data get run_filebeat --default "false")"
[ -z "${run_packetbeat+x}" ] && run_packetbeat="$(buildkite-agent meta-data get run_packetbeat --default "false")"
[ -z "${run_winlogbeat+x}" ] && run_winlogbeat="$(buildkite-agent meta-data get run_winlogbeat --default "false")"
[ -z "${run_xpack_libbeat+x}" ] && run_xpack_libbeat="$(buildkite-agent meta-data get run_xpack_libbeat --default "false")"
[ -z "${run_xpack_metricbeat+x}" ] && run_xpack_metricbeat="$(buildkite-agent meta-data get run_xpack_metricbeat --default "false")"
[ -z "${run_xpack_packetbeat+x}" ] && run_xpack_packetbeat="$(buildkite-agent meta-data get run_xpack_packetbeat --default "false")"
Expand Down Expand Up @@ -55,10 +54,6 @@ xpack_packetbeat_changeset=(
"^x-pack/packetbeat/.*"
)

xpack_winlogbeat_changeset=(
"^x-pack/winlogbeat/.*"
)

ci_changeset=(
"^.buildkite/.*"
)
Expand Down
154 changes: 129 additions & 25 deletions .buildkite/winlogbeat/pipeline.winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name: "beats-winlogbeat"

env:
BEATS_PROJECT_NAME: "winlogbeat"
GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8"
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
GCP_WIN_MACHINE_TYPE: "n2-standard-8"
Expand All @@ -17,33 +16,138 @@ env:
PACKAGING_ARM_PLATFORMS: "linux/arm64"
PACKAGING_PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"

#Deps
# Other deps
ASDF_MAGE_VERSION: 1.15.0

steps:
- group: "Winlogbeat Mandatory Tests"
key: "winlogbeat-mandatory-tests"

- input: "Input Parameters"
key: "input-run-all-stages"
fields:
- select: "Winlogbeat - run_winlogbeat"
key: "run_winlogbeat"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
if: "build.source == 'ui'"
steps:
- label: ":ubuntu: Crossccompile"
key: "mandatory-cross-compile"
command: "make -C winlogbeat crosscompile"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "Winlogbeat: Crosscompile"

- label: ":windows: Winlogbeat Win-2016 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
key: "mandatory-win-2016-unit-tests"
agents:
provider: "gcp"
image: "${IMAGE_WIN_2016}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "Winlogbeat: Win-2016 Unit Tests"

- label: ":windows: Winlogbeat Win-2019 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
key: "mandatory-win-2019-unit-tests"
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "Winlogbeat: Win-2019 Unit Tests"

- label: ":windows: Winlogbeat Win-2022 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
key: "mandatory-win-2022-unit-tests"
agents:
provider: "gcp"
image: "${IMAGE_WIN_2022}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "Winlogbeat: Win-2022 Unit Tests"

- group: "Extended Windows Tests"
key: "winlogbeat-extended-win-tests"

steps:
- label: ":windows: Winlogbeat Wind-10 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
key: "extended-win-10-unit-tests"
agents:
provider: "gcp"
image: "${IMAGE_WIN_10}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "Winlogbeat: Win-10 Unit Tests"

- label: ":windows: Winlogbeat Win-11 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
key: "extended-win-11-unit-tests"
agents:
provider: "gcp"
image: "${IMAGE_WIN_11}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "Winlogbeat: Win-11 Unit Tests"

- wait: ~
if: "build.source == 'ui'"
allow_dependency_failure: false

- label: ":linux: Load dynamic winlogbeat pipeline"
key: "winlogbeat-pipeline"
command: ".buildkite/scripts/generate_winlogbeat_pipeline.sh"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci:latest"
notify:
- github_commit_status:
context: "${BEATS_PROJECT_NAME}: Load dynamic pipeline's steps"
depends_on:
- step: "mandatory-tests"

- group: "Winlogbeat Packaging"
key: "winlogbeat-packaging"
steps:
- label: ":ubuntu: Winlogbeat Packaging Ubuntu x86_64"
key: "packaging-linux"
command: "cd winlogbeat && mage package"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
env:
PLATFORMS: "${PACKAGING_PLATFORMS}"
notify:
- github_commit_status:
context: "Winlogbeat: Packaging Ubuntu x86_64"

0 comments on commit 000819a

Please sign in to comment.