Jenkinsfile: Skip worker build for more cases
We can skip the CI worker build if the changes are only from gitlint, or the hidden files in the root folder, such as .github, .gitignore, .gitlint, .rustfmt.toml, and .typos.toml. Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
07475d2bc1
commit
c427f3a862
1 changed files with 14 additions and 0 deletions
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
|
|
@ -512,5 +512,19 @@ def boolean skipWorkerBuild() {
|
|||
return true
|
||||
}
|
||||
|
||||
if (sh(
|
||||
returnStatus: true,
|
||||
script: "git diff --name-only origin/${env.CHANGE_TARGET}... | grep -v '^\\.'"
|
||||
) != 0) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (sh(
|
||||
returnStatus: true,
|
||||
script: "git diff --name-only origin/${env.CHANGE_TARGET}... | grep -v 'gitlint'"
|
||||
) != 0) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue