Skip to content

Commit 9ae720b

Browse files
Spencerspalger
andcommitted
[Jenkins] run CI when plugin readmes change (#74388)
Co-authored-by: spalger <spalger@users.noreply.github.com>
1 parent 08b693d commit 9ae720b

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.ci/pipeline-library/src/test/prChanges.groovy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,17 @@ class PrChangesTest extends KibanaBasePipelineTest {
9797

9898
assertFalse(prChanges.areChangesSkippable())
9999
}
100+
101+
@Test
102+
void 'areChangesSkippable() with plugin readme changes'() {
103+
props([
104+
githubPrs: [
105+
getChanges: { [
106+
[filename: 'src/plugins/foo/README.asciidoc'],
107+
] },
108+
],
109+
])
110+
111+
assertFalse(prChanges.areChangesSkippable())
112+
}
100113
}

vars/prChanges.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def getNotSkippablePaths() {
2222
return [
2323
// this file is auto-generated and changes to it need to be validated with CI
2424
/^docs\/developer\/architecture\/code-exploration.asciidoc$/,
25+
// don't skip CI on prs with changes to plugin readme files (?i) is for case-insensitive matching
26+
/(?i)\/plugins\/[^\/]+\/readme\.(md|asciidoc)$/,
2527
]
2628
}
2729

0 commit comments

Comments
 (0)