Merge remote-tracking branch 'origin/master'

This commit is contained in:
Manuele Simi 2019-10-05 23:14:03 -04:00
commit c2ea89f1b4
1 changed files with 12 additions and 5 deletions

17
Jenkinsfile vendored
View File

@ -4,7 +4,7 @@ import org.yaml.snakeyaml.Yaml
def (options, maven_local_repo_path, maven_settings_file) = ['', '', ''] def (options, maven_local_repo_path, maven_settings_file) = ['', '', '']
def maven_jdk = 'OpenJDK 8' def maven_jdk = 'OpenJDK 8'
def agent_root_folder = '/var/lib/jenkins/.m2' def agent_root_folder = '/var/lib/jenkins/.m2'
def agent_label = 'pipeline-agent' //def agent_label = 'pipeline-agent-garr' //'pipeline-agent'
if (params.Type == 'SNAPSHOT-DRY-RUN') { if (params.Type == 'SNAPSHOT-DRY-RUN') {
echo "Configure Maven for SNAPSHOT-DRY-RUN artifacts" echo "Configure Maven for SNAPSHOT-DRY-RUN artifacts"
@ -62,7 +62,7 @@ pipeline {
// see https://jenkins.io/doc/book/pipeline/syntax/#agent // see https://jenkins.io/doc/book/pipeline/syntax/#agent
agent { agent {
label agent_label label 'pipeline-agent-garr'
} }
// see https://jenkins.io/doc/book/pipeline/syntax/#environment // see https://jenkins.io/doc/book/pipeline/syntax/#environment
@ -102,11 +102,18 @@ pipeline {
echo build(job: 'maven-parent', wait: true, echo build(job: 'maven-parent', wait: true,
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"],
[$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: agent_label, nodeEligibility: [$class: 'AllNodeEligibility']] [$class: 'LabelParameterValue', name: 'exec_label', label: "pipeline-agent-garr", nodeEligibility: [$class: 'AllNodeEligibility']]
]).result ]).result
echo "Done with maven-parent" echo "Done with maven-parent"
} }
} }
stage('build NoDeps components') {
steps {
buildComponents items: jsonConfig.gCube_release.Components.NoDeps?.collect { "${it.name}" },
"${maven_settings_file}", "${maven_local_repo_path}"
echo "Done with NoDeps components"
}
}
stage('build Core components') { stage('build Core components') {
steps { steps {
buildComponents items: jsonConfig.gCube_release.Components.Core?.collect { "${it.name}" }, buildComponents items: jsonConfig.gCube_release.Components.Core?.collect { "${it.name}" },
@ -175,7 +182,7 @@ pipeline {
steps { steps {
buildComponents items: jsonConfig.gCube_release.Components.Distribution?.collect { "${it?.name}" }, buildComponents items: jsonConfig.gCube_release.Components.Distribution?.collect { "${it?.name}" },
"${maven_settings_file}", "${maven_local_repo_path}" "${maven_settings_file}", "${maven_local_repo_path}"
echo "Done with Portlets components" echo "Done with Distribution components"
} }
} }
@ -190,7 +197,7 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path) {
build(job: name, build(job: name,
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"],
[$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: agent_label, nodeEligibility: [$class: 'AllNodeEligibility']] [$class: 'LabelParameterValue', name: 'exec_label', label: "pipeline-agent-garr", nodeEligibility: [$class: 'AllNodeEligibility']]
]) ])
} }
] ]