small fix

This commit is contained in:
Roberto Cirillo 2022-10-12 14:47:28 +02:00
parent 6d756fa30b
commit 8f1fd22867
1 changed files with 5 additions and 6 deletions

11
Jenkinsfile vendored
View File

@ -221,16 +221,15 @@ pipeline {
println("Going to deploy the Release components")
def releaseList = []
// boolean smartgears
def smartgears
String smartgears
def categories="${DEPLOY_CATEGORY}".split(',')
jsonConfig.gCube_release.Components.each { group_name, component_list ->
for ( def category : categories){
if("${group_name}" == "$category"){
if (category == 'Distribution'){
//smartgears = true
smartgears= component_list?.collect{ return "$it.version" }
println("smartgears found is ${smartgears}")
smartgears=(smartgears !=null ) ? smartgears[0] : null
def sg= component_list?.collect{ return "$it.version" }
smartgears=(sg !=null ) ? sg[0] : null
println("smartgears version is ${smartgears}")
continue
}
@ -312,7 +311,7 @@ def checkup(String service, String version, String host){
}
//launch ansible deploy
def deployRelease(String service, String version, boolean smartgears){
def deployRelease(String service, String version, String smartgears){
def now = new Date();
println("Going to deploy the service "+service+" with version: "+version+" on preproduction ");
def statusCode = sh( script: "cd $ANSIBLE_ROOT_FOLDER;git pull;./deployPreprodService.sh $service $version $smartgears ;", returnStdout: true);
@ -368,7 +367,7 @@ def deployJobs(def serviceList){
}
//Deploy only release components. All the component are passed as: componentName,componentVersion
def deployReleaseJobs(def serviceList, boolean smartgears){
def deployReleaseJobs(def serviceList, String smartgears){
for (def record : serviceList) {
println("Processing record: "+record)
service=record.split(",");