diff --git a/Jenkinsfile b/Jenkinsfile index 9ac747fccb7..5b905d7d3f3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1146,11 +1146,18 @@ def reportCoverage(){ } } -// isChanged treats the patterns as regular expressions. In order to check if -// any file in a directoy is modified use `^/.*`. +/** +* isChanged treats the patterns as regular expressions. In order to check if +* any file in a directoy is modified use `^/.*`. +* +* In addition, there are another two alternatives to report that there are +* changes, when `runAllStages` parameter is set to true or when running on a +* branch/tag basis. +*/ def isChanged(patterns){ return ( - params.runAllStages + params.runAllStages // when runAllStages UI parameter is set to true + || !isPR() // when running on a branch/tag || isGitRegionMatch(patterns: patterns, comparator: 'regexp') ) }