clean codefix case with 0 components. set cron every 15'

This commit is contained in:
Roberto Cirillo 2022-04-29 11:55:02 +02:00
parent 12c11d6047
commit 23caf0e0ce
2 changed files with 18 additions and 11 deletions

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

23
Jenkinsfile vendored
View File

@ -31,11 +31,11 @@ pipeline {
}
triggers {
// every fifteen minutes (perhaps at :07, :22, :37, :52)
// cron('H/15 * * * *')
cron('H/15 * * * *')
// once a day on the 1st and 15th of every month
// cron ('H H 1,15 * *')
// once every two hours at 45 minutes past the hour starting at 9:45 AM and finishing at 3:45 PM every weekday.
cron('45 9-20/2 * * 1-5')
// cron('45 9-20/2 * * 1-5')
}
//once in every two hours slot between 9 AM and 5 PM every weekday (perhaps at 10:38 AM, 12:38 PM, 2:38 PM, 4:38 PM)
// cron('H H(9-16)/2 * * 1-5')
@ -69,15 +69,16 @@ pipeline {
script {
// parse the report and extract the data
def components = parseCSVList(deployList)
assert 0 < components.size(): "No component found"
for (component in components) {
stage(component){
println "Deploy on going of component: $component"
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh "exit 0"
}
}
if (components.size() > 0) {
for (component in components) {
stage(component){
println "Deploy on going of component: $component"
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh "exit 0"
}
}
}else{
"No component found"
}
}
sh '''