generated from gCubeCI/Pipeline-Docker-Template
clean unused methods
This commit is contained in:
parent
4508798749
commit
c99b667698
|
@ -237,29 +237,6 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//parse a csv file formatted in this way: ComponentName,ComponentVersion, ComponentHost
|
||||
def getComponentsFromCSV(def deployList) {
|
||||
def components = []
|
||||
if (fileExists("${deployList}")) {
|
||||
echo 'file found'
|
||||
readFile("${deployList}").split('\n').each { line, count->
|
||||
if (line.startsWith('#'))
|
||||
return
|
||||
def fields = line.split(',')
|
||||
components.add([
|
||||
name : fields[0],
|
||||
version : fields[1],
|
||||
host : fields[2]
|
||||
]
|
||||
)
|
||||
}
|
||||
} else {
|
||||
echo ' File Not found. Failing.'
|
||||
}
|
||||
return components
|
||||
}
|
||||
|
||||
//launch ansible deploy
|
||||
def deploy(String service, String version, String host){
|
||||
def now = new Date();
|
||||
|
@ -281,18 +258,3 @@ def checkup(String service, String version, String host){
|
|||
esac
|
||||
""")
|
||||
}
|
||||
//clean and update the local deploy file
|
||||
def cleanup(def DEPLOY_FILE, def BACKUP_FILE){
|
||||
sh '''
|
||||
echo "cleanup $DEPLOY_FILE";
|
||||
if [ -f ${DEPLOY_FILE} ]; then
|
||||
if [ -f ${BACKUP_FILE} ]; then
|
||||
echo "backup found: ${BACKUP_FILE} going to replace it";
|
||||
rm ${BACKUP_FILE};
|
||||
fi
|
||||
mv ${DEPLOY_FILE} ${BACKUP_FILE};
|
||||
else
|
||||
echo "deploy file empty"
|
||||
fi
|
||||
'''
|
||||
}
|
Loading…
Reference in New Issue