mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
(cherry picked from commit c8624cdd98
)
Co-authored-by: Spencer <spencer@elastic.co>
This commit is contained in:
parent
3a5e04b444
commit
336e643480
2 changed files with 26 additions and 15 deletions
|
@ -10,20 +10,7 @@ const execSync = require('child_process').execSync;
|
|||
const fs = require('fs');
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
const { areChangesSkippable, doAnyChangesMatch } = require('kibana-buildkite-library');
|
||||
|
||||
const SKIPPABLE_PATHS = [
|
||||
/^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$/,
|
||||
];
|
||||
const { SKIPPABLE_PR_MATCHERS } = require('./skippable_pr_matchers');
|
||||
|
||||
const REQUIRED_PATHS = [
|
||||
// this file is auto-generated and changes to it need to be validated with CI
|
||||
|
@ -49,7 +36,7 @@ const uploadPipeline = (pipelineContent) => {
|
|||
|
||||
(async () => {
|
||||
try {
|
||||
const skippable = await areChangesSkippable(SKIPPABLE_PATHS, REQUIRED_PATHS);
|
||||
const skippable = await areChangesSkippable(SKIPPABLE_PR_MATCHERS, REQUIRED_PATHS);
|
||||
|
||||
if (skippable) {
|
||||
console.log('All changes in PR are skippable. Skipping CI.');
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* 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