mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user