diff --git a/.buildkite/pull-requests.json b/.buildkite/pull-requests.json index 2414a75b5b6..48b6a4c1862 100644 --- a/.buildkite/pull-requests.json +++ b/.buildkite/pull-requests.json @@ -1,26 +1,65 @@ { - "jobs": [ - { - "enabled": true, - "pipeline_slug": "logstash-pull-request-pipeline", - "allow_org_users": true, - "allowed_repo_permissions": ["admin", "write"], - "allowed_list": ["dependabot[bot]", "mergify[bot]", "github-actions[bot]", "elastic-vault-github-plugin-prod[bot]"], - "set_commit_status": true, - "build_on_commit": true, - "build_on_comment": true, - "trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))", - "always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))", - "skip_ci_labels": [ ], - "skip_target_branches": [ ], - "skip_ci_on_only_changed": [ - "^.github/", - "^docs/", - "^.mergify.yml$", - "^.pre-commit-config.yaml", - "\\.md$" - ], - "always_require_ci_on_changed": [ ] - } - ] - } + "jobs": [ + { + "enabled": true, + "pipeline_slug": "logstash-pull-request-pipeline", + "allow_org_users": true, + "allowed_repo_permissions": [ + "admin", + "write" + ], + "allowed_list": [ + "dependabot[bot]", + "mergify[bot]", + "github-actions[bot]", + "elastic-vault-github-plugin-prod[bot]" + ], + "set_commit_status": true, + "build_on_commit": true, + "build_on_comment": true, + "trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))", + "always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))", + "skip_ci_labels": [], + "skip_target_branches": [], + "skip_ci_on_only_changed": [ + "^.github/", + "^docs/", + "^.mergify.yml$", + "^.pre-commit-config.yaml", + "\\.md$" + ], + "always_require_ci_on_changed": [] + }, + { + "enabled": true, + "pipeline_slug": "logstash-smart-exhaustive-tests-pipeline", + "allow_org_users": true, + "allowed_repo_permissions": [ + "admin", + "write" + ], + "allowed_list": [ + "dependabot[bot]", + "mergify[bot]", + "github-actions[bot]" + ], + "set_commit_status": true, + "build_on_commit": true, + "build_on_comment": true, + "trigger_comment_regex": "^(?:(?:/run\\W+)?(?:exhaustive)\\W+(?:tests))", + "always_trigger_comment_regex": "^(?:(?:/run\\W+)(?:exhaustive)\\W+(?:tests))", + "skip_ci_labels": [], + "skip_target_branches": [], + "skip_ci_on_only_changed": [ + "^.github/", + "^docs/", + "^.mergify.yml$", + "^.pre-commit-config.yaml", + "\\.md$" + ], + "always_require_ci_on_changed": [ + "^qa/acceptance/" + ] + } + ] +} \ No newline at end of file diff --git a/.buildkite/smart_exhaustive_tests_pipeline.yml b/.buildkite/smart_exhaustive_tests_pipeline.yml new file mode 100644 index 00000000000..0e541f902d3 --- /dev/null +++ b/.buildkite/smart_exhaustive_tests_pipeline.yml @@ -0,0 +1,33 @@ +steps: + - label: "Trigger logstash-exhaustive-tests-pipeline for PRs with qa/acceptance/ changes" + if: build.pull_request.id != null + plugins: + - monorepo-diff#v1.0.1: + diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD" + interpolation: false + watch: + - path: + - ^qa/acceptance/ + - .buildkite/smart_exhaustive_tests_pipeline.yml + config: + trigger: "logstash-exhaustive-tests-pipeline" + 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} + - ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false + + - label: "Trigger logstash-exhaustive-tests-pipeline for GitHub comments" + if: build.env("GITHUB_PR_TRIGGER_COMMENT") != "" + trigger: "logstash-exhaustive-tests-pipeline" + 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} + - ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false diff --git a/catalog-info.yaml b/catalog-info.yaml index 6d7abe61aa3..27350e8ef76 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -478,6 +478,57 @@ spec: # SECTION END: Exhaustive tests pipeline # ************************************** +# **************************************** +# SECTION START: Smart exhaustive tests pipeline +# **************************************** + +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: logstash-smart-exhaustive-tests-pipeline + description: 'Logstash Smart Exhaustive tests pipeline' + links: + - title: 'Logstash Smart Exhaustive tests pipeline' + url: https://buildkite.com/elastic/logstash-smart-exhaustive-tests-pipeline +spec: + type: buildkite-pipeline + owner: group:logstash + system: platform-ingest + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: "Logstash Smart Exhaustive tests pipeline" + description: '🔍 Run smart exhaustive tests against Logstash using different operating systems' + spec: + repository: elastic/logstash + pipeline_file: ".buildkite/smart_exhaustive_tests_pipeline.yml" + provider_settings: + build_pull_request_forks: false + build_pull_requests: true # requires filter_enabled and filter_condition settings as below when used with buildkite-pr-bot + build_branches: false + build_tags: false + filter_enabled: true + filter_condition: >- + build.creator.name == 'elasticmachine' && build.pull_request.id != null + cancel_intermediate_builds: true + skip_intermediate_builds: true + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + logstash: + access_level: MANAGE_BUILD_AND_READ + ingest-eng-prod: + access_level: MANAGE_BUILD_AND_READ + everyone: + access_level: READ_ONLY + +# ************************************** +# SECTION END: Smart exhaustive tests pipeline +# ************************************** + # ******************************************** # Declare supported plugin tests pipeline # ********************************************