add check on snapshot; add host field in pending job stage

This commit is contained in:
Roberto Cirillo 2022-05-10 14:16:54 +02:00
parent 28f63c3eb9
commit 10ec47cbe5
1 changed files with 9 additions and 4 deletions

13
Jenkinsfile vendored
View File

@ -78,8 +78,8 @@ pipeline {
stage(component){
println "Deploy on going of component: $component"
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
// calling the ansible dispatcher here
sh "exit 0"
checkup("${component.name}", "${component.version}", "${component.host}");
deploy("${component.name}", "${component.version}", "${component.host}");
}
}
}
@ -116,7 +116,7 @@ pipeline {
if grep -q \"\${TRIGGER_JOB}\" \${DEPLOY_FILE}; then
echo "component ${TRIGGER_JOB} already added. Nothing to add."
else
echo "${TRIGGER_JOB},${TRIGGER_VERSION}" >> ${DEPLOY_FILE}
echo "${TRIGGER_JOB},${TRIGGER_VERSION},${}" >> ${DEPLOY_FILE}
fi
'''
}
@ -127,6 +127,10 @@ pipeline {
expression {
env.TRIGGER_CD.toBoolean()
}
expression {
return env.TRIGGER_VERSION.contains("SNAPSHOT")
}
anyOf{
triggeredBy 'BuildUpstreamCause'
triggeredBy 'UpstreamCause'
@ -184,7 +188,8 @@ def parseCSVList(def deployList) {
def fields = line.split(',')
components.add([
name : fields[0],
version : fields[1]
version : fields[1],
host : fields[2]
]
)
}