Skip to content

Instantly share code, notes, and snippets.

@rdeknijf
Created August 19, 2019 15:20
Show Gist options
  • Save rdeknijf/998f98321e071254a439663f4781c7c8 to your computer and use it in GitHub Desktop.
Save rdeknijf/998f98321e071254a439663f4781c7c8 to your computer and use it in GitHub Desktop.
Check Git changes in `admin` dir
stage('Init') {
steps {
script {
GIT_CHANGED_ADMIN = sh(returnStdout: true, script: "git diff-tree --name-only ${env.GIT_COMMIT} | grep admin | wc -l").trim().toBoolean()
echo "GIT_CHANGED_ADMIN = ${GIT_CHANGED_ADMIN}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment