diff --git a/Jenkinsfile b/Jenkinsfile index 69751af..854575d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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] ] ) }