From 1e3270999fbb79242c77e2bc325c8ed2c8c6604e Mon Sep 17 00:00:00 2001 From: "roberto.cirillo" Date: Thu, 6 Oct 2022 12:47:18 +0200 Subject: [PATCH] add conditional the report url discovering step --- Jenkinsfile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 25538a8..4f94e08 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,19 +12,22 @@ def agent_root_folder = '/var/lib/jenkins' // load the build report's content if present def text -String reportURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleases/raw/branch/master/open/${gCube_release_version}/build_commits.${params.report_number}.csv" -if (reportURL){ - println "Pulling the report from Git at ${reportURL}" - text = reportURL.toURL().getText() - // parse the report and extract the data - def components = parseBuildCommits(text) - assert 0 < components.size(): "No component found in build_commits.${report_number}.csv" - for (component in components) { - // here we need to filter on keywords matching component's section - println " $component" +if (params.report_number){ + String reportURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleases/raw/branch/master/open/${gCube_release_version}/build_commits.${params.report_number}.csv" + if (reportURL){ + println "Pulling the report from Git at ${reportURL}" + text = reportURL.toURL().getText() + // parse the report and extract the data + def components = parseBuildCommits(text) + assert 0 < components.size(): "No component found in build_commits.${report_number}.csv" + for (component in components) { + // here we need to filter on keywords matching component's section + println " $component" + } } } + def deployList def backupList if (params.deployFile) {