-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[ci] Allow triggering exhaustive tests from PRs depending on path #18202
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
Changes from all commits
e7e1218
4b19fe5
eb8c8e4
53323ab
e7b622b
6836cbe
5f31a13
66f5eba
8060880
d2bde74
b5ff323
c8268e9
51f0f43
0b8bd3f
748774d
6803cc3
9554ec4
9f9ee56
50fde26
62bf9b3
21ec30c
4532054
7c7504e
dd371da
9e80765
0d4ff1c
4ed0658
2c09f4c
ba7420c
9f0df4b
75b50e9
128ac9c
4ed4600
2940069
804dc36
07a231b
35fd6ec
db594c0
64bc382
2d8c3cc
155b4ca
50d6b3d
31a643c
50ee5c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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$" | ||
|
v1v marked this conversation as resolved.
|
||
| ], | ||
| "always_require_ci_on_changed": [ | ||
| "^qa/acceptance/" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. avoid slack notifications when using the smart pipeline, it runs only for PRs. |
||
|
|
||
| - label: "Trigger logstash-exhaustive-tests-pipeline for GitHub comments" | ||
| if: build.env("GITHUB_PR_TRIGGER_COMMENT") != "" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume GITHUB_PR_TRIGGER_COMMENT is set if it matches the regex set in the |
||
| 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} | ||
|
v1v marked this conversation as resolved.
|
||
| - ELASTIC_SLACK_NOTIFICATIONS_ENABLE=false | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| name: Update java version file | ||
| pipelineid: "logstash/jdk-version-updates-{{ requiredEnv "LOGSTASH_BRANCH" }}" | ||
|
|
||
| scms: | ||
| default: | ||
| kind: github | ||
| spec: | ||
| user: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
| username: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
| owner: '{{ .scm.owner }}' | ||
| repository: '{{ .scm.repository }}' | ||
| token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
| branch: '{{ requiredEnv "LOGSTASH_BRANCH" }}' | ||
| commitusingapi: true | ||
| force: false | ||
|
|
||
| sources: | ||
| jdk_major: | ||
| kind: yaml | ||
| spec: | ||
| file: "versions.yml" | ||
| key: "$.bundled_jdk.revision" | ||
| transformers: | ||
| - findsubmatch: | ||
| pattern: '^(\d+)\.\d+\.\d+$' | ||
| captureindex: 1 | ||
|
|
||
| latest_jdk_version: | ||
| kind: json | ||
| spec: | ||
| file: 'https://jvm-catalog.elastic.co/jdk/latest_adoptiumjdk_{{ source "jdk_major" }}_linux' | ||
| key: 'version' | ||
|
|
||
| latest_jdk_build: | ||
| kind: json | ||
| spec: | ||
| file: 'https://jvm-catalog.elastic.co/jdk/latest_adoptiumjdk_{{ source "jdk_major" }}_linux' | ||
| key: 'revision' | ||
|
|
||
| targets: | ||
| update_jdk_revision: | ||
| name: "Update JDK revision" | ||
| kind: yaml | ||
| sourceid: latest_jdk_version | ||
| spec: | ||
| file: versions.yml | ||
| key: $.bundled_jdk.revision | ||
|
|
||
| update_jdk_build: | ||
| name: "Update JDK build" | ||
| kind: yaml | ||
| sourceid: latest_jdk_build | ||
| spec: | ||
| file: versions.yml | ||
| key: $.bundled_jdk.build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| --- | ||
| name: Update logstash version files | ||
| pipelineid: "logstash/version-updates-{{ requiredEnv "LOGSTASH_BRANCH" }}" | ||
|
|
||
| scms: | ||
| default: | ||
| kind: github | ||
| spec: | ||
| user: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
| username: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
| owner: '{{ .scm.owner }}' | ||
| repository: '{{ .scm.repository }}' | ||
| token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
| branch: '{{ requiredEnv "LOGSTASH_BRANCH" }}' | ||
| commitusingapi: true | ||
| force: false | ||
|
|
||
| actions: | ||
| default: | ||
| title: 'Bump logstash version {{ requiredEnv "LOGSTASH_VERSION" }}' | ||
| kind: github/pullrequest | ||
| scmid: default | ||
| spec: | ||
| automerge: false | ||
| labels: | ||
| - automation | ||
| description: |- | ||
| ### What | ||
| Update logstash version | ||
|
|
||
| sources: | ||
| lock_file_exists: | ||
| kind: shell | ||
| scmid: default | ||
| spec: | ||
| command: test -f Gemfile.jruby-3.1.lock.release | ||
|
|
||
| targets: | ||
| update_logstash_version: | ||
| name: Update logstash version in versions.yml | ||
| kind: yaml | ||
| disablesourceinput: true | ||
| scmid: default | ||
| spec: | ||
| file: versions.yml | ||
| key: $.logstash | ||
| value: '{{ requiredEnv "LOGSTASH_VERSION" }}' | ||
|
|
||
| update_logstash_core_version: | ||
| name: Update logstash-core version in versions.yml | ||
| kind: yaml | ||
| disablesourceinput: true | ||
| scmid: default | ||
| spec: | ||
| file: versions.yml | ||
| key: $.logstash-core | ||
| value: '{{ requiredEnv "LOGSTASH_VERSION" }}' | ||
|
|
||
| update_gemfile_lock_dependency: | ||
| name: Update logstash-core dependency in lockfile | ||
| kind: file | ||
| disablesourceinput: true | ||
| scmid: default | ||
| dependson: | ||
| - 'source#lock_file_exists' | ||
| spec: | ||
| file: Gemfile.jruby-3.1.lock.release | ||
| matchpattern: 'logstash-core \(= [0-9]+\.[0-9]+\.[0-9]+' | ||
| replacepattern: 'logstash-core (= {{ requiredEnv "LOGSTASH_VERSION" }}' | ||
|
|
||
| update_gemfile_lock_spec: | ||
| name: Update logstash-core spec in lockfile | ||
| kind: file | ||
| disablesourceinput: true | ||
| scmid: default | ||
| dependson: | ||
| - 'source#lock_file_exists' | ||
| spec: | ||
| file: Gemfile.jruby-3.1.lock.release | ||
| matchpattern: 'logstash-core \([0-9]+\.[0-9]+\.[0-9]+-java\)' | ||
| replacepattern: 'logstash-core ({{ requiredEnv "LOGSTASH_VERSION" }}-java)' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| scm: | ||
| owner: elastic | ||
| repository: logstash |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,25 @@ | ||
| name: Stub GH action for devoping new workflows [STUB] | ||
| name: bump-java-version | ||
|
|
||
| on: | ||
| schedule: | ||
| # Run weekly on Mondays at midnight UTC | ||
| - cron: '0 0 * * 1' | ||
| workflow_dispatch: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
| contents: write | ||
|
|
||
| jobs: | ||
| stub_job_name: | ||
| name: Stub Job | ||
| bump: | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Stub step | ||
| run: | | ||
| echo "Stub to iterate via PR" | ||
|
|
||
| - uses: actions/checkout@v5 | ||
|
|
||
| - uses: elastic/oblt-actions/updatecli/run@v1 | ||
| with: | ||
| command: apply --config .ci/updatecli/bump-java-version.yml --values .ci/updatecli/values.d/scm.yml | ||
| version-file: .updatecli-version | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| LOGSTASH_BRANCH: ${{ github.ref_name }} |
Uh oh!
There was an error while loading. Please reload this page.