try to add the job branch as build method parameter

This commit is contained in:
Roberto Cirillo 2023-02-24 15:53:09 +01:00
parent 57553528d9
commit 4fa1f99429
1 changed files with 3 additions and 4 deletions

7
Jenkinsfile vendored
View File

@ -216,9 +216,7 @@ pipeline {
script {
jsonConfig.gCube_release.Components.each { group_name, component_list ->
stage("build ${group_name} components") {
when {
branch "master"
}
buildComponents items: component_list?.collect { "${it.name}" },
"${maven_settings_file}", "${maven_activation_property}", "${maven_local_repo_path}", jobs
echo "Done with ${group_name} components"
@ -296,7 +294,8 @@ def buildComponents(args, maven_settings_file, maven_activation_property, maven_
def gjob = build(job: name, wait: true, propagate: true,
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file} ${maven_activation_property}"],
[$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')]
])
sh "echo -e ${name},${gjob.getResult()} >> ${agent_root_folder}/build_jobs.${env.BUILD_NUMBER}.csv"
}