Files
devops-lib-gcp/vars/buildPipeline.groovy
T
2026-08-26 02:02:24 +05:30

44 lines
1.4 KiB
Groovy

import com.meesho.stages.checkOut
import com.meesho.stages.buildObjHelper
import com.meesho.stages.notify
import com.meesho.stages.securityScan
import com.meesho.stages.automationTest
import com.meesho.utilities.constructParam
def call(Map param) {
def constructParam = new constructParam()
def checkObj = new checkOut()
def buildObjHelper = new buildObjHelper()
def buildObj = buildObjHelper.run(param.build_tool)
def notify = new notify()
def securityScan = new securityScan()
def automationTest = new automationTest()
node('slave02') {
env.msg = 'Job Passed'
timestamps {
ansiColor('xterm') {
try {
constructParam.run(param)
log.info(param)
checkObj.run(param)
// securityScan.run(param)
buildObj.run(param)
if (param.containsKey('run_automation') && env.CHANGE_ID) {
automationTest.run(param)
}
}
catch (Exception e) {
if (env.msg == 'Job Passed') {
log.error(e.toString())
currentBuild.result = env.FAILURE
env.msg = 'Job Failed. Error: ' + e.toString()
}
}
finally {
notify.run(param)
}
}
}
}
}