|
|
@ -1,4 +1,4 @@
|
|
|
|
#!groovy
|
|
|
|
#!groovy
|
|
|
|
import org.yaml.snakeyaml.Yaml
|
|
|
|
import org.yaml.snakeyaml.Yaml
|
|
|
|
|
|
|
|
|
|
|
|
// set the build options according to the Type of build
|
|
|
|
// set the build options according to the Type of build
|
|
|
@ -124,10 +124,6 @@ pipeline {
|
|
|
|
string(name: 'resume_from',
|
|
|
|
string(name: 'resume_from',
|
|
|
|
defaultValue: '',
|
|
|
|
defaultValue: '',
|
|
|
|
description: 'Resume from a previous build identified by the build number.')
|
|
|
|
description: 'Resume from a previous build identified by the build number.')
|
|
|
|
|
|
|
|
|
|
|
|
booleanParam(name: 'ContinuousDeployment',
|
|
|
|
|
|
|
|
defaultValue: false,
|
|
|
|
|
|
|
|
description: 'If true, the gCubeDeployer pipeline will be triggered')
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//see https://jenkins.io/doc/book/pipeline/syntax/#stages
|
|
|
|
//see https://jenkins.io/doc/book/pipeline/syntax/#stages
|
|
|
@ -220,6 +216,7 @@ pipeline {
|
|
|
|
script {
|
|
|
|
script {
|
|
|
|
jsonConfig.gCube_release.Components.each { group_name, component_list ->
|
|
|
|
jsonConfig.gCube_release.Components.each { group_name, component_list ->
|
|
|
|
stage("build ${group_name} components") {
|
|
|
|
stage("build ${group_name} components") {
|
|
|
|
|
|
|
|
|
|
|
|
buildComponents items: component_list?.collect { "${it.name}" },
|
|
|
|
buildComponents items: component_list?.collect { "${it.name}" },
|
|
|
|
"${maven_settings_file}", "${maven_activation_property}", "${maven_local_repo_path}", jobs
|
|
|
|
"${maven_settings_file}", "${maven_activation_property}", "${maven_local_repo_path}", jobs
|
|
|
|
echo "Done with ${group_name} components"
|
|
|
|
echo "Done with ${group_name} components"
|
|
|
@ -237,7 +234,7 @@ pipeline {
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
def report_text = sh(script: 'cat ${AGENT_ROOT_FOLDER}/build_commits.csv', returnStdout: true)?.trim()
|
|
|
|
def report_text = sh(script: 'cat ${AGENT_ROOT_FOLDER}/build_commits.csv', returnStdout: true)?.trim()
|
|
|
|
|
|
|
|
|
|
|
|
def pjob = build(job: 'Pipeline-gCubeReleaseNotes', wait: true, propagate: false,
|
|
|
|
def pjob = build(job: 'Pipeline-gCubeReleaseNotes', wait: true, propagate: true,
|
|
|
|
parameters: [[$class: 'StringParameterValue', name: 'report', value: "${report_text}"],
|
|
|
|
parameters: [[$class: 'StringParameterValue', name: 'report', value: "${report_text}"],
|
|
|
|
[$class: 'StringParameterValue', name: 'report_number', value: "${env.BUILD_NUMBER}"],
|
|
|
|
[$class: 'StringParameterValue', name: 'report_number', value: "${env.BUILD_NUMBER}"],
|
|
|
|
[$class: 'StringParameterValue', name: 'gCube_release_version', value: "${params.gCube_release_version}"],
|
|
|
|
[$class: 'StringParameterValue', name: 'gCube_release_version', value: "${params.gCube_release_version}"],
|
|
|
@ -246,19 +243,6 @@ pipeline {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Deploy components') {
|
|
|
|
|
|
|
|
when {
|
|
|
|
|
|
|
|
expression { params.ContinuousDeployment.toBoolean() }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
|
|
|
|
|
|
|
script {
|
|
|
|
|
|
|
|
def pjob = build(job: 'gCubeDeployer', wait: true, propagate: true,
|
|
|
|
|
|
|
|
parameters: [[$class: 'StringParameterValue', name: 'gCube_release_version', value: "${params.gCube_release_version}"],
|
|
|
|
|
|
|
|
[$class: 'StringParameterValue', name: 'TRIGGER_JOB', value: "${JOB_NAME}"]]
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -310,7 +294,10 @@ def buildComponents(args, maven_settings_file, maven_activation_property, maven_
|
|
|
|
def gjob = build(job: name, wait: true, propagate: true,
|
|
|
|
def gjob = build(job: name, wait: true, propagate: true,
|
|
|
|
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file} ${maven_activation_property}"],
|
|
|
|
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file} ${maven_activation_property}"],
|
|
|
|
[$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"],
|
|
|
|
[$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"],
|
|
|
|
[$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']]
|
|
|
|
[$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']],
|
|
|
|
|
|
|
|
string(name: 'GIT_BRANCH_NAME', value: 'master'),
|
|
|
|
|
|
|
|
string(name: 'GIT_BRANCH', value: 'master'),
|
|
|
|
|
|
|
|
string(name: 'BRANCH_NAME', value: 'master')
|
|
|
|
])
|
|
|
|
])
|
|
|
|
sh "echo -e ${name},${gjob.getResult()} >> ${agent_root_folder}/build_jobs.${env.BUILD_NUMBER}.csv"
|
|
|
|
sh "echo -e ${name},${gjob.getResult()} >> ${agent_root_folder}/build_jobs.${env.BUILD_NUMBER}.csv"
|
|
|
|
}
|
|
|
|
}
|
|
|
|