Skip to content

Commit 3cada8a

Browse files
committed
updates
1 parent 32f8768 commit 3cada8a

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

src/main/resources/scripts/baseJenkinsfile.groovy

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,29 @@ def checkLogsForErrors(log) {
9191
return [foundKeywords, failure, unstable_flag]
9292
}
9393

94+
// ===============================================================
95+
//
96+
// Function : pluginCreateSummary
97+
// Inputs : log
98+
// Action : Scans the input log file to for keywords listed above
99+
// Returns : found foundKeywords, failure and/or unstable_flag
100+
// Notes : Used to Check for VectorCAST build errors/problems
101+
//
102+
// ===============================================================
103+
104+
def pluginCreateSummary(inIcon, inText) {
105+
106+
try {
107+
//Protected code
108+
createSummary icon: inIcon, text: inText
109+
110+
} catch(ExceptionName e1) {
111+
112+
//Catch block
113+
addSummary icon: inIcon, text: inText
114+
}
115+
}
116+
94117
// ===============================================================
95118
//
96119
// Function : checkBuildLogForErrors
@@ -945,7 +968,7 @@ pipeline {
945968

946969
if (VC_useCoverageHistory) {
947970
if ((currResult != currentBuild.result) && (currentBuild.result == 'FAILURE')) {
948-
createSummary icon: "icon-error icon-xlg", text: "Code Coverage Decreased"
971+
pluginCreateSummary("icon-error icon-xlg", "Code Coverage Decreased")
949972
currentBuild.description += "Code coverage decreased. See console log for details\n"
950973
addBadge icon: "icon-error icon-xlg", text: "Code Coverage Decreased"
951974
}
@@ -1010,7 +1033,7 @@ pipeline {
10101033
summaryText += "<hr style=\"height:5px;border-width:0;color:gray;background-color:gray\"> "
10111034
summaryText += readFile("${mpName}_metrics_report.html_tmp")
10121035

1013-
createSummary icon: "icon-document icon-xlg", text: summaryText
1036+
pluginCreateSummary ("icon-document icon-xlg", summaryText)
10141037

10151038
} else {
10161039
if (fileExists('combined_incr_rebuild.tmp')) {
@@ -1031,7 +1054,7 @@ pipeline {
10311054

10321055
// If not, something went wrong... Make the build as unstable
10331056
currentBuild.result = 'UNSTABLE'
1034-
createSummary icon: "icon-warning icon-xlg", text: "General Failure"
1057+
pluginCreateSummary ("icon-warning icon-xlg", "General Failure")
10351058
currentBuild.description += "General Failure, Incremental Build Report or Full Report Not Present. Please see the console for more information\n"
10361059
}
10371060
} else {
@@ -1040,12 +1063,12 @@ pipeline {
10401063
// Blue ocean view doesn't have a summary
10411064

10421065
summaryText += readFile("${mpName}_full_report.html_tmp") + "<br> " + readFile("${mpName}_metrics_report.html_tmp")
1043-
createSummary icon: "icon-document icon-xlg", text: summaryText
1066+
pluginCreateSummary ("icon-document icon-xlg", summaryText)
10441067

10451068
} else {
10461069
// If not, something went wrong... Make the build as unstable
10471070
currentBuild.result = 'UNSTABLE'
1048-
createSummary icon: "icon-warning icon-xlg", text: "General Failure"
1071+
pluginCreateSummary ("icon-warning icon-xlg", "General Failure")
10491072
currentBuild.description += "General Failure, Full Report or Metrics Report Not Present. Please see the console for more information\n"
10501073
}
10511074
}

src/main/resources/scripts/copy_build_dir.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,13 @@ def run(ManageProjectName, Level, BaseName, Env, workspace):
200200
BaseName = sys.argv[3]
201201
Env = sys.argv[4]
202202
workspace = os.getenv("WORKSPACE")
203-
203+
204204
if workspace is None:
205205
workspace = os.getcwd()
206206

207+
if workspace.endswith("/") or workspace.endswith("\\"):
208+
workspace = workspace[:-1]
209+
207210
os.environ['VCAST_MANAGE_PROJECT_DIRECTORY'] = os.path.abspath(ManageProjectName).rsplit(".",1)[0]
208211

209212
run(ManageProjectName, Level, BaseName, Env, workspace)

src/main/resources/scripts/generate-results.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,7 @@ def buildReports(FullManageProjectName = None, level = None, envName = None, gen
538538
use_manage_api = True
539539
api.close()
540540
except:
541-
teePrint.teePrint(" *INFO: Issue getting tool version from: " + FullManageProjectName)
542-
if print_exc: traceback.print_exc()
541+
##teePrint.teePrint(" *INFO: Issue getting tool version from: " + FullManageProjectName)
543542
use_manage_api = False
544543

545544
if use_manage_api:

0 commit comments

Comments
 (0)