mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
[ci] break out skip patterns so they can change without triggering CI (#131726)
This commit is contained in:
parent
984e212bb8
commit
c8624cdd98
2 changed files with 26 additions and 15 deletions
|
@ -9,20 +9,7 @@
|
||||||
const execSync = require('child_process').execSync;
|
const execSync = require('child_process').execSync;
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const { areChangesSkippable, doAnyChangesMatch } = require('kibana-buildkite-library');
|
const { areChangesSkippable, doAnyChangesMatch } = require('kibana-buildkite-library');
|
||||||
|
const { SKIPPABLE_PR_MATCHERS } = require('./skippable_pr_matchers');
|
||||||
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 REQUIRED_PATHS = [
|
const REQUIRED_PATHS = [
|
||||||
// this file is auto-generated and changes to it need to be validated with CI
|
// this file is auto-generated and changes to it need to be validated with CI
|
||||||
|
@ -48,7 +35,7 @@ const uploadPipeline = (pipelineContent) => {
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const skippable = await areChangesSkippable(SKIPPABLE_PATHS, REQUIRED_PATHS);
|
const skippable = await areChangesSkippable(SKIPPABLE_PR_MATCHERS, REQUIRED_PATHS);
|
||||||
|
|
||||||
if (skippable) {
|
if (skippable) {
|
||||||
console.log('All changes in PR are skippable. Skipping CI.');
|
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