generated from gCubeCI/Pipeline-Docker-Template
small fix
This commit is contained in:
parent
092b4213d3
commit
d7bc7469e0
|
@ -104,20 +104,13 @@ pipeline {
|
||||||
echo 'Cron build enabled. Deploy from system ongoing'
|
echo 'Cron build enabled. Deploy from system ongoing'
|
||||||
script {
|
script {
|
||||||
println "Going to check the deploy file in ${PENDING_DEPLOY_FOLDER}"
|
println "Going to check the deploy file in ${PENDING_DEPLOY_FOLDER}"
|
||||||
// def records = readCSV file: 'CD/deploy.csv'
|
|
||||||
// def files = findFiles(glob: 'target/surefire-reports/*.csv')
|
|
||||||
def deployFolder="CD-${env.BUILD_NUMBER}";
|
def deployFolder="CD-${env.BUILD_NUMBER}";
|
||||||
println ("searching files in folder ${deployFolder}");
|
println ("searching files in folder ${deployFolder}");
|
||||||
def files = findFiles(glob: "${deployFolder}/*.csv")
|
def files = findFiles(glob: "${deployFolder}/*.csv")
|
||||||
if (files == null){
|
if (files == null){
|
||||||
println ("Nothing to do");
|
println ("Nothing to do");
|
||||||
}else{
|
}else{
|
||||||
for ( def file : files){
|
def serviceList = []
|
||||||
sh """
|
|
||||||
touch ${deployFolder}/testdeploy.csv
|
|
||||||
${file.path} >> ${deployFolder}/testdeploy.csv
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
for (def file : files){
|
for (def file : files){
|
||||||
echo """
|
echo """
|
||||||
Found: ${file.name} with path ${file.path}
|
Found: ${file.name} with path ${file.path}
|
||||||
|
@ -126,17 +119,20 @@ pipeline {
|
||||||
def records = readCSV file: "${file.path}"
|
def records = readCSV file: "${file.path}"
|
||||||
for (def record : records) {
|
for (def record : records) {
|
||||||
println("Processing record: "+record)
|
println("Processing record: "+record)
|
||||||
stage(record.get(0)){
|
if(!serviceList.contains(record.get(0))){
|
||||||
println "Deploy on going of component: record.get(0)"
|
stage(record.get(0)){
|
||||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
println "Deploy on going of component: record.get(0)"
|
||||||
checkup(record.get(0), record.get(1), record.get(2));
|
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||||
deploy(record.get(0), record.get(1), record.get(2));
|
checkup(record.get(0), record.get(1), record.get(2));
|
||||||
}
|
deploy(record.get(0), record.get(1), record.get(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
serviceList << record.get(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sh "rm ${file.path}"
|
sh "rm ${file.path}"
|
||||||
}
|
}
|
||||||
// sh "rm -Rf ${deployFolder}"
|
sh "rm -Rf ${deployFolder}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue