mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[CI] Move PR skippable changes to pr-bot config (#132461)
This commit is contained in:
parent
6cf8ebfdcc
commit
dac92b2b84
3 changed files with 23 additions and 32 deletions
|
@ -16,7 +16,25 @@
|
|||
"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-ci", "jenkins-ci"],
|
||||
"skip_target_branches": ["6.8", "7.11", "7.12"]
|
||||
"skip_target_branches": ["6.8", "7.11", "7.12"],
|
||||
"skip_ci_on_only_changed": [
|
||||
"^docs/",
|
||||
"^rfcs/",
|
||||
"^.ci/.+\\.yml$",
|
||||
"^.ci/es-snapshots/",
|
||||
"^.ci/pipeline-library/",
|
||||
"^.ci/Jenkinsfile_[^/]+$",
|
||||
"^\\.github/",
|
||||
"\\.md$",
|
||||
"^\\.backportrc\\.json$",
|
||||
"^nav-kibana-dev\\.docnav\\.json$",
|
||||
"^src/dev/prs/kibana_qa_pr_list\\.json$",
|
||||
"^\\.buildkite/pull_requests\\.json$"
|
||||
],
|
||||
"always_require_ci_on_changed": [
|
||||
"^docs/developer/plugin-list.asciidoc$",
|
||||
"/plugins/[^/]+/readme\\.(md|asciidoc)$"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -9,14 +9,11 @@
|
|||
const execSync = require('child_process').execSync;
|
||||
const fs = require('fs');
|
||||
const { areChangesSkippable, doAnyChangesMatch } = require('kibana-buildkite-library');
|
||||
const { SKIPPABLE_PR_MATCHERS } = require('./skippable_pr_matchers');
|
||||
const prConfigs = require('../../../pull_requests.json');
|
||||
const prConfig = prConfigs.jobs.find((job) => job.pipelineSlug === 'kibana-pull-request');
|
||||
|
||||
const REQUIRED_PATHS = [
|
||||
// this file is auto-generated and changes to it need to be validated with CI
|
||||
/^docs\/developer\/plugin-list.asciidoc$/,
|
||||
// don't skip CI on prs with changes to plugin readme files /i is for case-insensitive matching
|
||||
/\/plugins\/[^\/]+\/readme\.(md|asciidoc)$/i,
|
||||
];
|
||||
const REQUIRED_PATHS = prConfig.always_require_ci_on_changed.map((r) => new RegExp(r, 'i'));
|
||||
const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed.map((r) => new RegExp(r, 'i'));
|
||||
|
||||
const getPipeline = (filename, removeSteps = true) => {
|
||||
const str = fs.readFileSync(filename).toString();
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
SKIPPABLE_PR_MATCHERS: [
|
||||
/^docs\//,
|
||||
/^rfcs\//,
|
||||
/^.ci\/.+\.yml$/,
|
||||
/^.ci\/es-snapshots\//,
|
||||
/^.ci\/pipeline-library\//,
|
||||
/^.ci\/Jenkinsfile_[^\/]+$/,
|
||||
/^\.github\//,
|
||||
/\.md$/,
|
||||
/^\.backportrc\.json$/,
|
||||
/^nav-kibana-dev\.docnav\.json$/,
|
||||
/^src\/dev\/prs\/kibana_qa_pr_list\.json$/,
|
||||
/^\.buildkite\/scripts\/pipelines\/pull_request\/skippable_pr_matchers\.js$/,
|
||||
],
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue