diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index 3aee226..51b1cf4 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -171,15 +171,15 @@ String get_changelog(repo_name) { */ String extract(log_content, tag, gCube_release_version, component) { println "Changelong content: ${log_content}" - def matcher = "${log_content}" =~ /(?im)\([v${tag}\]\s\[r${gCube_release_version}\].*)\[v.*\]\s\[r.*\]/ + def matcher = ("${log_content}" =~ /(?is)(\[v1\.1\.0\]\s+\[r4\.22\.0\](.+?))\[v.*\]/) if (!matcher.find()) { return 'NA' } assert matcher[0]: "Missing release notes for ${component}" - for (g in matcher) { - println "Group: $g" + for (i=0; i < matcher.getCount(); i++) { + println "notes matched in matcher[${i}]: '" + matcher[i][0] + "'" } - return matcher[0] + return matcher[0][0] } /**