Skip to content

Commit 32c8058

Browse files
committed
Use bash
Signed-off-by: Chris Yan <chrisyan@microsoft.com>
1 parent aedb87a commit 32c8058

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.jenkins/Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pipeline {
112112
currentBuild.result = 'ABORTED'
113113
error("Pull request author ${PR_AUTHOR} is not in the list of authorized users. Aborting build.")
114114
} else {
115-
println("Pull request author ${PR_AUTHOR} is whitelisted. Build will continue.")
115+
println("Pull request author ${PR_AUTHOR} is authorized. Build will continue.")
116116
}
117117
// Set pull request ID for standalone builds
118118
PULL_REQUEST_ID = CHANGE_ID
@@ -137,11 +137,11 @@ pipeline {
137137
// This is the git ref in a Jenkins multibranch pipeline build
138138
SOURCE_BRANCH = "origin/PR-${env.CHANGE_ID}"
139139
}
140-
CHANGED_FILES = sh(
140+
CHANGED_FILES = bash(
141141
returnStdout: true,
142142
script: """
143143
git diff --name-only \$(git merge-base origin/master ${SOURCE_BRANCH})..${SOURCE_BRANCH} \
144-
| grep --invert-match --extended-regexp \'${IGNORED_DIRS_REGEX}\' --no-messages || [[ \$? == 1 ]]
144+
| grep --invert-match --extended-regexp \'${IGNORED_DIRS_REGEX}\' --no-messages || test \$? = 1
145145
"""
146146
)
147147
if ( CHANGED_FILES == '' ) {

0 commit comments

Comments
 (0)