I want the smoke test to be happen on set of files in specific path when the branch is a pull request and if there are any changes in particular path #536
function:
def checkFolderForDiffs(path) {
try {
// git diff will return 1 for changes (failure) which is caught in catch, or
// 0 meaning no changes
sh "git diff-index --exit-code HEAD~1..HEAD ${path}"
return false
} catch (err) {
return true
}
}
if(isPullRequest && checkFolderForDiffs('products/eio/')) {
function: def checkFolderForDiffs(path) { try { // git diff will return 1 for changes (failure) which is caught in catch, or // 0 meaning no changes sh "git diff-index --exit-code HEAD~1..HEAD ${path}" return false } catch (err) { return true } }