mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
Jenkinsfile: Bypass running CI for fuzzer Cargo file changes
In order to conserve resources it is better to not run CI, whenever there are changes only in fuzz/Cargo.toml or fuzz/Cargo.lock. Fixes #4148 Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
parent
a7a15d56dd
commit
86d243938e
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
@ -23,6 +23,19 @@ pipeline{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage ('Check for fuzzer cargo files only changes') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
return fuzzCargoFileOnly()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
runWorkers = false
|
||||||
|
echo "Fuzzer cargo files only changes, no need to run the CI"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage ('Check for RFC/WIP builds') {
|
stage ('Check for RFC/WIP builds') {
|
||||||
when {
|
when {
|
||||||
changeRequest comparator: 'REGEXP', title: '.*(rfc|RFC|wip|WIP).*'
|
changeRequest comparator: 'REGEXP', title: '.*(rfc|RFC|wip|WIP).*'
|
||||||
@ -287,3 +300,14 @@ def boolean docsFileOnly() {
|
|||||||
script: "git diff --name-only origin/${env.CHANGE_TARGET}... | grep -v '\\.md'"
|
script: "git diff --name-only origin/${env.CHANGE_TARGET}... | grep -v '\\.md'"
|
||||||
) != 0
|
) != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def boolean fuzzCargoFileOnly() {
|
||||||
|
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)'"
|
||||||
|
) != 0
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user