diff --git a/Jenkinsfile b/Jenkinsfile index c5dcc1f6e64..dd3c38a052d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1102,11 +1102,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') ) }