From 131b73de0b4ece1689f71112f82fcb2054e72396 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 4 Oct 2019 15:29:30 +0200 Subject: [PATCH 1/3] Changed "agent_label" var to: pipeline-agent-garr --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2648956..4693d5d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ import org.yaml.snakeyaml.Yaml def (options, maven_local_repo_path, maven_settings_file) = ['', '', ''] def maven_jdk = 'OpenJDK 8' 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') { echo "Configure Maven for SNAPSHOT-DRY-RUN artifacts" From 0c538c01f66a342be532cbcbc1fb4ec98f450975 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 4 Oct 2019 15:47:02 +0200 Subject: [PATCH 2/3] Added NoDeps stage --- Jenkinsfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4693d5d..33125fa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -107,6 +107,13 @@ pipeline { 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') { steps { buildComponents items: jsonConfig.gCube_release.Components.Core?.collect { "${it.name}" }, @@ -175,7 +182,7 @@ pipeline { steps { buildComponents items: jsonConfig.gCube_release.Components.Distribution?.collect { "${it?.name}" }, "${maven_settings_file}", "${maven_local_repo_path}" - echo "Done with Portlets components" + echo "Done with Distribution components" } } From 5ed3477f319ee44c8ae4e8db538bc72c651ee37b Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 4 Oct 2019 16:54:33 +0200 Subject: [PATCH 3/3] remove agent_label var. set pipeline-agent-garr as string --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 33125fa..d44a3fc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ import org.yaml.snakeyaml.Yaml def (options, maven_local_repo_path, maven_settings_file) = ['', '', ''] def maven_jdk = 'OpenJDK 8' def agent_root_folder = '/var/lib/jenkins/.m2' -def agent_label = 'pipeline-agent-garr' //'pipeline-agent' +//def agent_label = 'pipeline-agent-garr' //'pipeline-agent' if (params.Type == 'SNAPSHOT-DRY-RUN') { echo "Configure Maven for SNAPSHOT-DRY-RUN artifacts" @@ -62,7 +62,7 @@ pipeline { // see https://jenkins.io/doc/book/pipeline/syntax/#agent agent { - label agent_label + label 'pipeline-agent-garr' } // see https://jenkins.io/doc/book/pipeline/syntax/#environment @@ -102,7 +102,7 @@ pipeline { echo build(job: 'maven-parent', wait: true, parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], [$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 echo "Done with maven-parent" } @@ -197,7 +197,7 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path) { build(job: name, parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], [$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']] ]) } ]