Skip to content

Commit b14e0de

Browse files
v1vmergify[bot]
authored andcommitted
ci: use if_changed (#11414)
(cherry picked from commit ed59055) # Conflicts: # .buildkite/pipeline.yml
1 parent f6262c9 commit b14e0de

File tree

1 file changed

+59
-53
lines changed

1 file changed

+59
-53
lines changed

.buildkite/pipeline.yml

Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -281,65 +281,50 @@ steps:
281281
# Runs only on main and if k8s files are changed
282282
- label: "Trigger k8s sync"
283283
branches: main
284-
plugins:
285-
- monorepo-diff#v1.2.0:
286-
diff: "git diff --name-only HEAD~1"
287-
interpolation: false
288-
watch:
289-
- path:
290-
- deploy/kubernetes/*
291-
- version/docs/version.asciidoc
292-
config:
293-
label: "Sync K8s"
294-
command: ".buildkite/scripts/steps/sync-k8s.sh"
295-
agents:
296-
provider: "gcp"
297-
image: "${IMAGE_UBUNTU_2204_X86_64}"
298-
env:
299-
- GH_VERSION=2.4.0
284+
command: ".buildkite/scripts/steps/sync-k8s.sh"
285+
agents:
286+
provider: "gcp"
287+
image: "${IMAGE_UBUNTU_2204_X86_64}"
288+
env:
289+
GH_VERSION: "2.4.0"
290+
if_changed:
291+
include:
292+
- deploy/kubernetes/*
293+
- version/docs/version.asciidoc
300294

301295
# Trigger for pull requests
302296
- label: "Trigger Extended tests for Pull request"
303297
if: |
304298
(build.pull_request.id != null && !build.env("GITHUB_PR_LABELS") =~ /skip-it/) ||
305299
build.env("GITHUB_PR_TRIGGER_COMMENT") =~ /.*extended.*/
306-
307-
plugins:
308-
- monorepo-diff#v1.2.0:
309-
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
310-
interpolation: false
311-
watch:
312-
- path:
313-
- internal/
314-
- dev-tools/
315-
- pkg/
316-
- deploy/
317-
- test_infra/
318-
- testing/
319-
- version/
320-
- specs/
321-
- .agent-versions.json
322-
- .go-version
323-
- .package-version
324-
- go.mod
325-
- go.sum
326-
- magefile.go
327-
- main.go
328-
329-
- .buildkite/integration.pipeline.yml
330-
- .buildkite/bk.integration.pipeline.yml
331-
- .buildkite/bk.integration-fips.pipeline.yml
332-
- .buildkite/pipeline.yml
333-
- .buildkite/scripts/
334-
- .buildkite/hooks/
335-
336-
config:
337-
label: ":pipeline: Upload extended testing Pipeline"
338-
command: "buildkite-agent pipeline upload .buildkite/integration.pipeline.yml"
339-
env:
340-
- BUILDKITE_PULL_REQUEST=${BUILDKITE_PULL_REQUEST}
341-
- BUILDKITE_PULL_REQUEST_BASE_BRANCH=${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
342-
- GITHUB_PR_LABELS=${GITHUB_PR_LABELS}
300+
command: "buildkite-agent pipeline upload .buildkite/integration.pipeline.yml"
301+
env:
302+
BUILDKITE_PULL_REQUEST: ${BUILDKITE_PULL_REQUEST}
303+
BUILDKITE_PULL_REQUEST_BASE_BRANCH: ${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
304+
GITHUB_PR_LABELS: ${GITHUB_PR_LABELS}
305+
if_changed:
306+
include:
307+
- internal/**
308+
- dev-tools/**
309+
- pkg/**
310+
- deploy/**
311+
- test_infra/**
312+
- testing/**
313+
- version/**
314+
- specs/**
315+
- .agent-versions.json
316+
- .go-version
317+
- .package-version
318+
- go.mod
319+
- go.sum
320+
- magefile.go
321+
- main.go
322+
- .buildkite/integration.pipeline.yml
323+
- .buildkite/bk.integration.pipeline.yml
324+
- .buildkite/bk.integration-fips.pipeline.yml
325+
- .buildkite/pipeline.yml
326+
- .buildkite/scripts/**
327+
- .buildkite/hooks/**
343328

344329
# Trigger for branches
345330
- label: "Triggering Extended tests for branches"
@@ -352,6 +337,7 @@ steps:
352337
# this should help detecting issues earlier in the development cycle
353338
- label: "Trigger Serverless Beats Tests"
354339
if: build.pull_request.id != null
340+
<<<<<<< HEAD
355341
plugins:
356342
- monorepo-diff#v1.2.0:
357343
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
@@ -366,3 +352,23 @@ steps:
366352
build:
367353
commit: "${BUILDKITE_COMMIT}"
368354
branch: "${BUILDKITE_BRANCH}"
355+
=======
356+
trigger: "beats-agent-serverless-tests"
357+
build:
358+
commit: "${BUILDKITE_COMMIT}"
359+
branch: "${BUILDKITE_BRANCH}"
360+
if_changed:
361+
include:
362+
- .buildkite/serverless.beats.tests.yml
363+
- .buildkite/scripts/steps/beats_tests.sh
364+
- .buildkite/hooks/pre-command
365+
366+
# wait for CI to be done
367+
- wait: ~
368+
369+
- label: "Publish to serverless"
370+
branches: main
371+
trigger: "agentless-serverless-release"
372+
build:
373+
commit: "${BUILDKITE_COMMIT}"
374+
>>>>>>> ed5905518 (ci: use if_changed (#11414))

0 commit comments

Comments
 (0)