Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.14](backport #4906) [CI] Monorepo diff plugin for integration tests #4922

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,51 @@ steps:
image: "family/core-ubuntu-2204"
env:
- GH_VERSION=2.4.0

# Trigger for pull requests
- label: "Trigger Integration tests for Pull request"
if: |
(build.pull_request.id != null && !build.env("GITHUB_PR_LABELS") =~ /skip-it/) ||
build.env("GITHUB_PR_TRIGGER_COMMENT") =~ /.*extended.*/

plugins:
- monorepo-diff#v1.0.1:
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
watch:
- path:
- internal/
- dev-tools/
- pkg/
- testing/
- version/
- specs/
- .agent-versions.json
- .go-version
- .package-version
- go.mod
- go.sum
- magefile.go
- main.go

- .buildkite/integration.pipeline.yml
- .buildkite/pipeline.yml
- .buildkite/scripts/
- .buildkite/hooks/

config:
trigger: "elastic-agent-extended-testing"
build:
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
env:
- BUILDKITE_PULL_REQUEST=${BUILDKITE_PULL_REQUEST}
- BUILDKITE_PULL_REQUEST_BASE_BRANCH=${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
- GITHUB_PR_LABELS=${GITHUB_PR_LABELS}

# Trigger for branches
- label: "Triggering Integration tests for branches"
if: build.pull_request.id == null
trigger: "elastic-agent-extended-testing"
build:
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
8 changes: 4 additions & 4 deletions .buildkite/pull-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"set_commit_status": true,
"build_on_commit": true,
"build_on_comment": true,
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$",
"skip_ci_labels": [ ],
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it|extended))|^/test\\W*(?:extended|)",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it|extended))|^/test\\W*(?:extended|)",
"skip_ci_labels": [ "skip-ci" ],
"skip_target_branches": [ ],
"skip_ci_on_only_changed": [ ],
"skip_ci_on_only_changed": [ "^.ci/", "^changelog", "^docs/", "\\.md$", "^docker-compose.yml", "^.pre-commit-config.yaml", "skaffold.yaml", "^Dockerfile.skaffold", "^Dockerfile"],
"always_require_ci_on_changed": [ ]
},
{
Expand Down
Loading