generated from gCubeCI/Pipeline-Docker-Template
Set as variable the yaml group that identify the SG distribution
This commit is contained in:
parent
ba87906dd4
commit
ed1071bdb4
|
@ -78,8 +78,10 @@ pipeline {
|
|||
RELEASE_JOB='gCubeBuilder'
|
||||
//URL to the YAML file. Used alternatively to RELEASE_JOB
|
||||
RELEASE_URL= "${params.RELEASE_URL}"
|
||||
// username of ReleaseManager
|
||||
// username of ReleaseManager. Used for limiting the preproduction deployments
|
||||
RELEASE_MANAGER_USER='roberto.cirillo'
|
||||
// name of Smartgears distribution group, defined in the yaml file ( only for release deployments)
|
||||
DISTRIBUTION_CATEGORY='Distribution'
|
||||
}
|
||||
|
||||
parameters {
|
||||
|
@ -338,7 +340,6 @@ def parseDeployPendingJobs( def deployFolder){
|
|||
//Deploy jobs from an input list with the following elements: serviceName,serviceVersion,targetHost. Create a new stage for any job
|
||||
def deployJobs(def serviceList){
|
||||
for (def record : serviceList) {
|
||||
println("Processing record: "+record)
|
||||
service=record.split(",");
|
||||
stage(service[0]){
|
||||
println("Processing deploy: "+service[ 0 ])
|
||||
|
@ -353,7 +354,6 @@ def deployJobs(def serviceList){
|
|||
//Deploy only release components. All the component are passed as: componentName,componentVersion
|
||||
def deployReleaseJobs(def serviceList, String smartgears){
|
||||
for (def record : serviceList) {
|
||||
println("Processing record: "+record)
|
||||
service=record.split(",");
|
||||
stage(service[0]){
|
||||
println("Processing RELEASE deploy: service "+service[ 0 ]+" with version "+service[ 1 ]+" and SG "+smartgears)
|
||||
|
@ -376,7 +376,7 @@ def deployRelease(def categoryList, def yaml){
|
|||
if (categories.contains(group_name)){
|
||||
for ( def category : categories){
|
||||
if("${group_name}" == "$category"){
|
||||
if (category == 'Distribution'){
|
||||
if (category == "${DISTRIBUTION_CATEGORY}"){
|
||||
//searching smartgears-distribution version in Distribution component of defined inside the yaml file
|
||||
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }}
|
||||
smartgears=(sg !=null ) ? sg[0] : null
|
||||
|
@ -390,6 +390,3 @@ def deployRelease(def categoryList, def yaml){
|
|||
}
|
||||
deployReleaseJobs(releaseList, smartgears);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue