generated from gCubeCI/Pipeline-Docker-Template
small change
This commit is contained in:
parent
fa0928823d
commit
99d8a90706
|
@ -109,7 +109,7 @@ pipeline {
|
|||
def deployFolder="CD-${env.BUILD_NUMBER}";
|
||||
println ("searching files in folder ${deployFolder}");
|
||||
def files = findFiles(glob: "${deployFolder}/*.csv")
|
||||
if (files.isEmpty()){
|
||||
if (files == null){
|
||||
println ("Nothing to do");
|
||||
}else{
|
||||
for (def file : files){
|
||||
|
@ -127,9 +127,10 @@ pipeline {
|
|||
deploy(record.get(0), record.get(1), record.get(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
clean(${file.path});
|
||||
}
|
||||
cleanup(DEPLOY_FILE,BACKUP_FILE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -307,6 +308,19 @@ def cleanup(def DEPLOY_FILE, def BACKUP_FILE){
|
|||
'''
|
||||
}
|
||||
|
||||
/clean and update the local deploy file
|
||||
def clean(def DEPLOY_FILE){
|
||||
sh '''
|
||||
echo "cleanup $DEPLOY_FILE";
|
||||
if [ -f ${DEPLOY_FILE} ]; then
|
||||
rm ${DEPLOY_FILE};
|
||||
else
|
||||
echo "deploy file empty"
|
||||
fi
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
//experimental test
|
||||
def getComponentsFromCSVDir4(def dirPath){
|
||||
sh '''
|
||||
|
|
Loading…
Reference in New Issue