From eebdae552913388cfab4b9a848b62178fc7ed096 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Tue, 9 Nov 2021 16:10:09 +0100 Subject: [PATCH] Trying to execute a bash command --- Jenkinsfile | 52 +--------------------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0e57fd3..68c6777 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -188,61 +188,11 @@ def printReport(report) { } def appendNotes(report) { - sh(""" + sh("""#!/bin/bash echo -e "${report}" > $WALKER_NOTES """) } -// print the final report -def saveReport(report) { - def text = '' - def indent = '\t' - sh(""" - echo "Dependency Report for ${report['project']}" > $WALKER_NOTES - echo "\n\n" >> $WALKER_NOTES - echo "|--Project Maven Modules " >> $WALKER_NOTES - """) - report['downstream_modules'].each { depth, artifacts -> - artifacts.each { name, data -> - sh(""" - echo "${indent}|--Module: ${name}\n" >> $WALKER_NOTES - echo "${indent * 2}|--Deepest Dependency Level: ${depth}\n" >> $WALKER_NOTES - echo "${indent * 2}|--Used by (Maven Modules)\n" >> $WALKER_NOTES - """) - data['dependencies'].each { d -> - sh(""" - echo "${indent * 3}|--${d}" >> $WALKER_NOTES - echo "\n" >> $WALKER_NOTES - """) - } - sh(""" - echo "${indent * 2}|--Referred by (Jenkins Projects)\n" >> $WALKER_NOTES - """) - data['projects'].each { p -> - sh(""" - echo "${indent * 3}|--${p}" >> $WALKER_NOTES - echo "\n" >> $WALKER_NOTES - """) - } - } - } - sh(""" - echo "\n\n" >> $WALKER_NOTES - echo "|--All Downstream Projects\n" >> $WALKER_NOTES - """) - report['downstream_projects'].unique().sort() - report['downstream_projects'].each { p -> - sh(""" - echo "${indent}|--${p}" >> $WALKER_NOTES - echo "\n" >> $WALKER_NOTES - """) - } - -} - - - - // debug job def printJob(job) { println("fullname ${job.fullName}")