manage comments on deploy file parsing

This commit is contained in:
Roberto Cirillo 2022-04-28 10:33:47 +02:00
parent 00f1e7b869
commit ea8ba55ee2
1 changed files with 5 additions and 5 deletions

10
Jenkinsfile vendored
View File

@ -164,6 +164,8 @@ def parseCSVList(def deployList) {
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],
@ -192,11 +194,9 @@ def appendToFile(String fileName, String line) {
def appendFooter( def File) {
def now = new Date()
sh("""
echo "" >> $File
echo "---" >> $File
echo "*generated by the gCubeDeploy pipeline >> $File
echo "" >> $File
echo "*last update $now*" >> $File
echo "#---" >> $File
echo "#generated by the gCubeDeploy pipeline >> $File
echo "#last update $now*" >> $File
""")
}