Skip to content

Commit 6380ea5

Browse files
authored
[CI] Separated extended testing pipeline (elastic#4739)
* Separated extended testing pipeline * remaned to integration pipeline * Added concurrency group and BEAT_NAME * removed BEAT_NAME var from Serverless Beats tests
1 parent c5e9707 commit 6380ea5

File tree

5 files changed

+75
-50
lines changed

5 files changed

+75
-50
lines changed

.buildkite/hooks/pre-command

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent-package" ]]; then
4646
fi
4747
fi
4848

49-
if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent" && "$BUILDKITE_STEP_KEY" == *"integration-tests"* ]]; then
49+
if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent-extended-testing" && "$BUILDKITE_STEP_KEY" == *"integration-tests"* ]]; then
5050
# Set GCP credentials
5151
export GOOGLE_APPLICATION_GCP_SECRET=$(retry 5 vault kv get -format=json -field=data ${CI_GCP_OBS_PATH})
5252
echo "${GOOGLE_APPLICATION_GCP_SECRET}" > ./gcp.json

.buildkite/hooks/pre-exit

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -eo pipefail
44

5-
if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent" && "$BUILDKITE_STEP_KEY" == *"integration-tests"* ]]; then
5+
if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent-extended-testing" && "$BUILDKITE_STEP_KEY" == *"integration-tests"* ]]; then
66
if [[ -z "${WORKSPACE-""}" ]]; then
77
WORKSPACE=$(git rev-parse --show-toplevel)
88
fi

.buildkite/integration.pipeline.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
3+
env:
4+
DOCKER_REGISTRY: "docker.elastic.co"
5+
VAULT_PATH: "kv/ci-shared/observability-ingest/cloud/gcp"
6+
7+
steps:
8+
- label: "Serverless integration test"
9+
key: "serverless-integration-tests"
10+
concurrency_group: elastic-agent-extended-testing/serverless-integration
11+
concurrency: 8
12+
env:
13+
BEAT_NAME: "elastic-agent"
14+
command: ".buildkite/scripts/steps/integration_tests.sh serverless integration:single TestLogIngestionFleetManaged" #right now, run a single test in serverless mode as a sort of smoke test, instead of re-running the entire suite
15+
artifact_paths:
16+
- "build/TEST-**"
17+
- "build/diagnostics/*"
18+
agents:
19+
provider: "gcp"
20+
machineType: "n1-standard-8"
21+
notify:
22+
- github_commit_status:
23+
context: "Serverless integration test"
24+
25+
- label: "Extended runtime leak tests"
26+
key: "extended-integration-tests"
27+
concurrency_group: elastic-agent-extended-testing/leak-tests
28+
concurrency: 8
29+
env:
30+
BEAT_NAME: "elastic-agent"
31+
command: ".buildkite/scripts/steps/integration_tests.sh stateful integration:TestForResourceLeaks"
32+
artifact_paths:
33+
- "build/TEST-**"
34+
- "build/diagnostics/*"
35+
agents:
36+
provider: "gcp"
37+
machineType: "n1-standard-8"
38+
notify:
39+
- github_commit_status:
40+
context: "Extended runtime leak tests"
41+
42+
- label: "Integration tests"
43+
key: "integration-tests"
44+
concurrency_group: elastic-agent-extended-testing/integration
45+
concurrency: 8
46+
env:
47+
BEAT_NAME: "elastic-agent"
48+
command: ".buildkite/scripts/steps/integration_tests.sh stateful"
49+
artifact_paths:
50+
- "build/TEST-**"
51+
- "build/diagnostics/*"
52+
agents:
53+
provider: "gcp"
54+
machineType: "n1-standard-8"
55+
notify:
56+
- github_commit_status:
57+
context: "Integration tests"
58+
59+
- label: "Serverless Beats Tests"
60+
key: "serverless-beats-integration-tests"
61+
concurrency_group: elastic-agent-extended-testing/beats-integration
62+
concurrency: 8
63+
command: ".buildkite/scripts/steps/beats_tests.sh"
64+
# if: "build.env('CRON') == 'yes'"
65+
agents:
66+
provider: "gcp"
67+
machineType: "n1-standard-8"
68+
retry:
69+
manual:
70+
allowed: true
71+
notify:
72+
- github_commit_status:
73+
context: "Serverless Beats Tests"

.buildkite/pipeline.yml

-41
Original file line numberDiff line numberDiff line change
@@ -213,47 +213,6 @@ steps:
213213
manual:
214214
allowed: true
215215

216-
- label: "Serverless integration test"
217-
key: "serverless-integration-tests"
218-
command: ".buildkite/scripts/steps/integration_tests.sh serverless integration:single TestLogIngestionFleetManaged" #right now, run a single test in serverless mode as a sort of smoke test, instead of re-running the entire suite
219-
artifact_paths:
220-
- "build/TEST-**"
221-
- "build/diagnostics/*"
222-
agents:
223-
provider: "gcp"
224-
machineType: "n1-standard-8"
225-
226-
- label: "Extended runtime leak tests"
227-
key: "extended-integration-tests"
228-
command: ".buildkite/scripts/steps/integration_tests.sh stateful integration:TestForResourceLeaks"
229-
artifact_paths:
230-
- "build/TEST-**"
231-
- "build/diagnostics/*"
232-
agents:
233-
provider: "gcp"
234-
machineType: "n1-standard-8"
235-
236-
- label: "Integration tests"
237-
key: "integration-tests"
238-
command: ".buildkite/scripts/steps/integration_tests.sh stateful"
239-
artifact_paths:
240-
- "build/TEST-**"
241-
- "build/diagnostics/*"
242-
agents:
243-
provider: "gcp"
244-
machineType: "n1-standard-8"
245-
246-
- label: "Serverless Beats Tests"
247-
key: "serverless-beats-integration-tests"
248-
command: ".buildkite/scripts/steps/beats_tests.sh"
249-
# if: "build.env('CRON') == 'yes'"
250-
agents:
251-
provider: "gcp"
252-
machineType: "n1-standard-8"
253-
retry:
254-
manual:
255-
allowed: true
256-
257216
# Triggers a dynamic step: Sync K8s
258217
# Runs only on main and if k8s files are changed
259218
- label: "Trigger k8s sync"

.pre-commit-config.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,3 @@ repos:
33
rev: v4.0.1
44
hooks:
55
- id: check-merge-conflict
6-
7-
- repo: https://github.com/elastic/apm-pipeline-library.git
8-
rev: current
9-
hooks:
10-
- id: check-jenkins-pipelines
11-
files: ^(.ci/(.*\.groovy|Jenkinsfile)|Jenkinsfile)$
12-
- id: check-jjbb

0 commit comments

Comments
 (0)