Load the build report as local file when the report_file is specified.
This commit is contained in:
parent
14383ce589
commit
288e30491e
|
@ -9,11 +9,18 @@
|
|||
def agent_root_folder = '/var/lib/jenkins/.m2'
|
||||
|
||||
//locate the build file
|
||||
String reportURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleaseConfigs/raw/branch/master/closed/${gCube_release_version}/build_commits.${report_number}.csv"
|
||||
println "Querying ${reportURL}"
|
||||
def text
|
||||
if (params.report_file) {
|
||||
println "Using local report at ${params.report_file}"
|
||||
text = new File(params.report_file).text
|
||||
|
||||
//load and parse the release file
|
||||
def text = reportURL.toURL().getText()
|
||||
} else {
|
||||
String reportURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleaseConfigs/raw/branch/master/closed/${gCube_release_version}/build_commits.${report_number}.csv"
|
||||
println "Pulling the report from Git at ${reportURL}"
|
||||
//load the report file
|
||||
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) {
|
||||
|
@ -45,6 +52,10 @@ pipeline {
|
|||
defaultValue: '',
|
||||
description: 'The report number to use for tagging.')
|
||||
|
||||
string(name: 'report_file',
|
||||
defaultValue: '',
|
||||
description: 'The local file path of the build report. Leave blank to pull the build report from Git.')
|
||||
|
||||
booleanParam(name: 'use_report_commits',
|
||||
defaultValue: true,
|
||||
description: 'Use the commits on the report or the latest is on master?')
|
||||
|
|
Loading…
Reference in New Issue