Skip to content

Commit 20c44ac

Browse files
authored
[8.19] (backport #11414) ci: use if_changed (#11478)
1 parent f6262c9 commit 20c44ac

File tree

1 file changed

+47
-67
lines changed

1 file changed

+47
-67
lines changed

.buildkite/pipeline.yml

Lines changed: 47 additions & 67 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,17 +337,12 @@ 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
355-
plugins:
356-
- monorepo-diff#v1.2.0:
357-
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
358-
interpolation: false
359-
watch:
360-
- path:
361-
- .buildkite/serverless.beats.tests.yml
362-
- .buildkite/scripts/steps/beats_tests.sh
363-
- .buildkite/hooks/pre-command
364-
config:
365-
trigger: "beats-agent-serverless-tests"
366-
build:
367-
commit: "${BUILDKITE_COMMIT}"
368-
branch: "${BUILDKITE_BRANCH}"
340+
trigger: "beats-agent-serverless-tests"
341+
build:
342+
commit: "${BUILDKITE_COMMIT}"
343+
branch: "${BUILDKITE_BRANCH}"
344+
if_changed:
345+
include:
346+
- .buildkite/serverless.beats.tests.yml
347+
- .buildkite/scripts/steps/beats_tests.sh
348+
- .buildkite/hooks/pre-command

0 commit comments

Comments
 (0)