feature/25131 #6

Merged
roberto.cirillo merged 31 commits from feature/25131 into master 2023-09-07 14:56:01 +02:00
1 changed files with 9 additions and 9 deletions
Showing only changes of commit 9d7fbced7f - Show all commits

18
Jenkinsfile vendored
View File

@ -271,8 +271,8 @@ pipeline {
}
}
/* CHECKUP METHODS */
/* CHECKUP METHODS */
//Implement a new method in order to check the input parameters
def checkup(String service, String version, String host){
@ -285,7 +285,6 @@ def checkup(String service, String version, String host){
""")
}
//Implement a new method in order to check the input parameters
def checkupRelease(String service, String version){
sh("""
@ -320,6 +319,7 @@ def parseDeployPendingJobs( def deployFolder){
deployJobs(serviceList.unique())
}
}
//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) {
@ -349,9 +349,9 @@ def deploy(String service, String version, String host){
/* DEPLOY RELEASE METHODS*/
// collects all the components defined inside one or more yaml categories matching categoryList and invoke the deploy
def deployRelease(def categoryList, def yaml){
def isPortlet= false
def releaseList = []
def portlets = []
String smartgears
@ -370,7 +370,7 @@ def deployRelease(def categoryList, def yaml){
// def read = readJSON file: 'portlets.json'
// println("Portlets found: "+read.name+" "+read.version+ " "+read.extension)
def output = sh(returnStdout: true, returnStdoutTrim: true, script: "mv portlets.json $ANSIBLE_ROOT_FOLDER")
echo "Output: '${output}'"
isPortlet= true
}else{
releaseList += component_list?.collect {return "$it.name,$it.version" }
}
@ -379,11 +379,11 @@ def deployRelease(def categoryList, def yaml){
}
}
}
deployReleaseJobs(releaseList, smartgears);
deployReleaseJobs(releaseList, smartgears, isPortlet);
}
//Deploy only release components, starting from a servicelist. All the component are passed as: componentName,componentVersion
def deployReleaseJobs(def serviceList, String smartgears){
def deployReleaseJobs(def serviceList, String smartgears, boolean isPortlet){
if (serviceList){
println("Going to deploy release components");
for (def record : serviceList) {
@ -399,8 +399,9 @@ def deployReleaseJobs(def serviceList, String smartgears){
}
}
}
if (isPortlet){
deployReleaseJob('generic-portlet', '','');
}
}else{
println("Release components not found. Skip this stage");
@ -408,7 +409,6 @@ def deployReleaseJobs(def serviceList, String smartgears){
}
//Run ansible deploy related to a single service
def deployReleaseJob(String service, String version, String smartgears){
def now = new Date();