add conditional the report url discovering step

This commit is contained in:
Roberto Cirillo 2022-10-06 12:47:18 +02:00
parent 2577fa7ac8
commit 1e3270999f
1 changed files with 13 additions and 10 deletions

23
Jenkinsfile vendored
View File

@ -12,19 +12,22 @@ def agent_root_folder = '/var/lib/jenkins'
// load the build report's content if present // load the build report's content if present
def text 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 (params.report_number){
if (reportURL){ String reportURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleases/raw/branch/master/open/${gCube_release_version}/build_commits.${params.report_number}.csv"
println "Pulling the report from Git at ${reportURL}" if (reportURL){
text = reportURL.toURL().getText() println "Pulling the report from Git at ${reportURL}"
// parse the report and extract the data text = reportURL.toURL().getText()
def components = parseBuildCommits(text) // parse the report and extract the data
assert 0 < components.size(): "No component found in build_commits.${report_number}.csv" def components = parseBuildCommits(text)
for (component in components) { assert 0 < components.size(): "No component found in build_commits.${report_number}.csv"
// here we need to filter on keywords matching component's section for (component in components) {
println " $component" // here we need to filter on keywords matching component's section
println " $component"
}
} }
} }
def deployList def deployList
def backupList def backupList
if (params.deployFile) { if (params.deployFile) {