// pipeline running from gerrit trigger.
// kickoff the downstream multibranch pipeline
def downstream_params = [
// pipeline running from gerrit trigger.
// kickoff the downstream multibranch pipeline
def downstream_params = [
string(name: 'GERRIT_PROJECT', value: GERRIT_PROJECT),
string(name: 'GERRIT_REFSPEC', value: GERRIT_REFSPEC),
string(name: 'GERRIT_PATCHSET_REVISION', value: GERRIT_PATCHSET_REVISION),
string(name: 'GERRIT_PROJECT', value: GERRIT_PROJECT),
string(name: 'GERRIT_REFSPEC', value: GERRIT_REFSPEC),
string(name: 'GERRIT_PATCHSET_REVISION', value: GERRIT_PATCHSET_REVISION),
string(name: 'PROJECT_URL_PREFIX', value: params.PROJECT_URL_PREFIX),
string(name: 'DOCKER_TAG', value: params.DOCKER_TAG),
booleanParam(name: 'TEST_INSTALL', value: params.TEST_INSTALL),
string(name: 'PROJECT_URL_PREFIX', value: params.PROJECT_URL_PREFIX),
string(name: 'DOCKER_TAG', value: params.DOCKER_TAG),
booleanParam(name: 'TEST_INSTALL', value: params.TEST_INSTALL),
}
// callout to stage_2. This is a multi-branch pipeline.
downstream_job_name = "${mdg}-${stage_name}/${GERRIT_BRANCH}"
}
// callout to stage_2. This is a multi-branch pipeline.
downstream_job_name = "${mdg}-${stage_name}/${GERRIT_BRANCH}"
currentBuild.result = 'SUCCESS'
try {
stage_3_merge_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true
currentBuild.result = 'SUCCESS'
try {
stage_3_merge_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true
project = stage_3_merge_result.getProjectName()
build = stage_3_merge_result.getNumber()
// Jayant if the build fails the below error will cause the pipeline to terminate.
project = stage_3_merge_result.getProjectName()
build = stage_3_merge_result.getNumber()
// Jayant if the build fails the below error will cause the pipeline to terminate.
- // error("${project} build ${build} failed")
- currentBuild.result = stage_3_merge_result.getResult()
+ // error("${project} build ${build} failed")
+ currentBuild.result = stage_3_merge_result.getResult()
emailext (
subject: "[OSM-Jenkins] Job: ${env.JOB_NAME} Build: ${env.BUILD_NUMBER} Result: ${currentBuild.result}",
body: """ Check console output at "${env.BUILD_URL}" """,
emailext (
subject: "[OSM-Jenkins] Job: ${env.JOB_NAME} Build: ${env.BUILD_NUMBER} Result: ${currentBuild.result}",
body: """ Check console output at "${env.BUILD_URL}" """,