Repository navigation
Expand file tree
/
Copy pathpipeline.yml
More file actions
129 lines (114 loc) · 3.96 KB
/
Copy pathpipeline.yml
File metadata and controls
129 lines (114 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
env:
SETUP_GVM_VERSION: 'v0.6.0' # https://github.com/andrewkroh/gvm/issues/44#issuecomment-1013231151
DOCKER_COMPOSE_VERSION: "v2.24.1"
DOCKER_VERSION: "26.1.2"
KIND_VERSION: 'v0.32.0'
K8S_VERSION: 'v1.36.1'
YQ_VERSION: 'v4.44.3'
# Agent images used in pipeline steps
LINUX_GOLANG_AGENT_IMAGE: "golang:${GO_VERSION}"
UBUNTU_X86_64_AGENT_IMAGE: "family/core-ubuntu-2204"
MACOS_ARM_AGENT_IMAGE: "generic-13-ventura-arm"
# Using this one instead of family/core-windows-2022 because of conflicts with the pre-installed docker.
WINDOWS_AGENT_IMAGE: "family/platform-ingest-beats-windows-2022"
# Elastic package settings
# Manage docker output/logs
ELASTIC_PACKAGE_COMPOSE_DISABLE_VERBOSE_OUTPUT: "true"
# Set maximum number of parallel tests to run if package allows it
ELASTIC_PACKAGE_MAXIMUM_NUMBER_PARALLEL_TESTS: 3
# Enable/Disable the usage of wolfi images for Elastic Agent
ELASTIC_PACKAGE_DISABLE_ELASTIC_AGENT_WOLFI: "${ELASTIC_PACKAGE_DISABLE_ELASTIC_AGENT_WOLFI:-false}"
steps:
- label: ":go: Run check-static"
key: check-static
command: "make check-static"
agents:
image: "${LINUX_GOLANG_AGENT_IMAGE}"
cpu: "8"
memory: "4G"
- label: ":github: Release"
key: "release"
if: |
build.tag =~ /^v[0-9]+[.][0-9]+[.][0-9]+$$/
command: ".buildkite/scripts/release.sh"
agents:
provider: "gcp"
plugins:
# required to create GitHub releases
- elastic/vault-github-token#v0.1.0:
- group: ":go: Run Unit tests"
key: unit-tests
steps:
- label: ":linux: Run unit tests"
key: unit-tests-linux
command: "make test-go-ci"
artifact_paths:
- "build/test-results/*.xml"
- "build/test-coverage/*.xml"
agents:
image: "${LINUX_GOLANG_AGENT_IMAGE}"
cpu: "8"
memory: "4G"
- label: ":windows: Run unit tests"
key: unit-tests-windows
command: ".buildkite/scripts/unit_tests_windows.ps1"
agents:
provider: "gcp"
image: "${WINDOWS_AGENT_IMAGE}"
artifact_paths:
- "TEST-unit-windows.xml"
- label: ":macos: Run unit tests"
key: unit-tests-mac-arm
command: ".buildkite/scripts/unit_tests_macos_arm.sh"
agents:
provider: "orka"
imagePrefix: "${MACOS_ARM_AGENT_IMAGE}"
artifact_paths:
- "build/test-results/*.xml"
- wait: ~
continue_on_failure: true
- label: ":pipeline: Trigger Integration tests"
command: ".buildkite/pipeline.trigger.integration.tests.sh | buildkite-agent pipeline upload"
depends_on:
- step: check-static
allow_failure: false
- step: unit-tests-linux
allow_failure: false
- label: ":windows: Run stack tests"
key: stack-tests-windows
command: ".buildkite/scripts/stack_tests_windows.ps1"
agents:
provider: "gcp"
image: "${WINDOWS_AGENT_IMAGE}"
depends_on:
- step: check-static
allow_failure: false
- step: unit-tests-windows
allow_failure: false
artifact_paths:
- 'C:\ProgramData\chocolatey\logs\chocolatey.log'
- wait: ~
continue_on_failure: true
- label: ":junit: Transform windows paths to linux for Junit plugin"
commands:
- buildkite-agent artifact download "*-windows.xml" . --step unit-tests-windows
- mkdir -p build/test-results
- for file in $(ls *-windows.xml); do mv $$file build/test-results/; done
agents:
image: "${LINUX_GOLANG_AGENT_IMAGE}"
cpu: "8"
memory: "4G"
artifact_paths:
- "build/test-results/*.xml"
- wait: ~
continue_on_failure: true
- label: ":junit: Junit annotate"
agents:
# requires at least "bash", "curl" and "git"
image: "docker.elastic.co/ci-agent-images/buildkite-junit-annotate:1.0"
plugins:
- junit-annotate#v2.7.0:
artifacts: "build/test-results/*.xml"
report-skipped: true
always-annotate: true
run-in-docker: false