Hi All ,
I am using jenkins shared library framework , where i have requirement to
publish unit test results upon completion of stage.
i have written logic for publishing result to database in java file called
JenkinsUtil.java which contains different static method to push results to
database.
I am importing class as import com.jda.JenkinsUtil and using it in script
file pipeline.groovy as below .
I am always facing issue as
groovy.lang.MissingPropertyException: No such property: JenkinsUtil for class
can anyone please help
I am using this as below,
try {
stage(stageName) {
withEnv(['INSTALLER_MODULE=' + instanceName])
{
if (instanceName == 'scsc') {
sh "ant -DBUILD_MODULES='scsc' -buildfile
${BUILD_ROOT}/build/build.xml unittest_run_all create_files_for_sonaranalysis"
} else if (instanceName == 'DRM') {
withEnv(['INSTALLER_MODULE=drm'])
{
sh "ant
-DBUILD_MODULES='pricing,markdown,apm' -buildfile ${BUILD_ROOT}/build/build.xml
unittest_run_all"
}
} else {
sh "ant -DBUILD_MODULES='${instanceName}'
-Dpatch.number='' -buildfile ${BUILD_ROOT}/build/build.xml " + target
}
}
}
println("before Jenkins Util class call")
JenkinsUtil.utStats("${BUILD_ROOT}/weblogic/utreports/dm/TESTS-TestSuites.xml",
array[0], array[1], "2019.1", "${BUILD_ROOT}
http://md1npdvbuild87:8080/view/Junit/job/Datamgmt-UT/Datamgmt_UT_Reports/", "")
println("after Jenkins Util class call")
}
catch (e) {
println 'exception occured at module' + instanceName + "exception occured
is" + e
}
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/b24b311a-6198-44eb-8a4f-3dae55b59774%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.