mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
build: Skip running Jenkins if fuzzer only changes
There is no point in wasting resources building use Jenkins if the change only modifies the fuzzers. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
57ee561c39
commit
df10dab952
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -23,10 +23,10 @@ pipeline{
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ('Check for fuzzer cargo files only changes') {
|
||||
stage ('Check for fuzzer files only changes') {
|
||||
when {
|
||||
expression {
|
||||
return fuzzCargoFileOnly()
|
||||
return fuzzFileOnly()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
@ -416,13 +416,13 @@ def boolean docsFileOnly() {
|
||||
) != 0
|
||||
}
|
||||
|
||||
def boolean fuzzCargoFileOnly() {
|
||||
def boolean fuzzFileOnly() {
|
||||
if (env.CHANGE_TARGET == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return sh(
|
||||
returnStatus: true,
|
||||
script: "git diff --name-only origin/${env.CHANGE_TARGET}... | grep -v -E 'fuzz\\/Cargo.(toml|lock)'"
|
||||
script: "git diff --name-only origin/${env.CHANGE_TARGET}... | grep -v -E 'fuzz/'"
|
||||
) != 0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user