From ddfa536c691f8e88ac55e28c8940aa18f3fc838c Mon Sep 17 00:00:00 2001 From: "roberto.cirillo" Date: Thu, 6 Oct 2022 09:58:03 +0200 Subject: [PATCH] add load build report's content. add input parameters related to the build report --- Jenkinsfile | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b130700..132f700 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,26 @@ 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/closed/${gCube_release_version}/build_commits.${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) { @@ -61,7 +81,15 @@ pipeline { description: 'Set to false to avoid current deploy') string(name: 'gCube_release_version', defaultValue: '', - description: 'Leave blank if executed outside gCube release') + description: 'The number of the gCube release. Leave blank if executed outside gCube release.') + string(name: 'report_number', + defaultValue: '', + description: 'The build report number on Git to pull the notes. Leave blank if executed outside gCube release.') + + string(name: 'report', + defaultValue: '', + description: 'The build report. Leave blank to pull the build report from Git. Leave blank if executed outside gCube release.') + }