I have a Jenkins project with several conditional build steps. I would
like for Jenkins to exit out of the build if it encounters an error code in
ANY of the build steps. It is not recognizing the Clearcase cleartool
error code – Result: 1 and marks the step as successful and continues on to
the next build step. I have tried the Text Finder plug-in, but this only
runs at the END of all of the build steps, which is too late. How can I
have Jenkins search the console output after a build step and exit the
build if it finds an error?
See output example below.
*updateManifest*:
[exec] Set activity "Manifest_update" in view
"SCMBuild_TestBld_CredTst".
[exec] cleartool: Error: Element "MANIFEST.MF" is already checked out
to view "SCMBuild_TestBld_CredTst".
[exec] Result: 1
[exec] cleartool: Error: By default, won't create version with data
identical to predecessor.
[exec] cleartool: Error: Unable to check in "MANIFEST.MF".
[exec] Result: 1
[exec] cleartool: Error: Element "AAS-SSO.ear" is already checked out
to view "SCMBuild_TestBld_CredTst".
[exec] Result: 1
BUILD SUCCESSFUL
Total time: 2 seconds
[Current build status] check if current [SUCCESS] is worse or equals then
[SUCCESS] and better or equals then [SUCCESS]
Run condition [Current build status] enabling perform for step [Invoke Ant]
[Jenkins] $ cmd.exe /C '"C:\apache-ant-1.9.6\bin\ant.bat -file
build.scm.xml -DclearcaseStream=SCMBuild_TestBld_CredTst
-DConfigDocumentDirectory=N/A -DprojectVob=p_test-parent
-Dbuildpath=test-parent\TestBld\BF_AAS_SSO
-DclearcaseView=SCMBuild_TestBld_CredTst -DartifactList=AAS-SSO.ear
-DbuildIncrement=02 -DprojectName=CREDTST
-DdeveloperBaseline=TST_CredTstParent_20151207_01
-DSTATIC.cleartool=C:\IBM\RationalSDLC\ClearCase\bin\cleartool.exe
-DapplicationName=TestBld checkInArtifacts && exit %%ERRORLEVEL%%"'
Buildfile: C:\SCM\Jenkins\build.scm.xml
*checkInArtifacts*:
[exec] cleartool: Warning: Activity being unset
"activity:Manifest_update@\p_test-parent" has checkouts.
[exec] Set activity "CREDTST_QA_BLD" in view
"SCMBuild_TestBld_CredTst".
[echo] Checking in artifact -
M:\SCMBuild_TestBld_CredTst\TestBld_Deploy\Artifacts\AAS-SSO.ear
[exec] Checked in "AAS-SSO.ear" version
"\main\SCMBuild_TestBld_CredTst\3".
[exec] Attached activity:
[exec] activity:Manifest_update@\p_test-parent "Manifest_update"
BUILD SUCCESSFUL
Total time: 2 seconds
Run condition [Never] preventing perform for step [Invoke Ant]
Checking console output
C:\Program Files (x86)\Jenkins\jobs\Parent Test Project\builds\36\log:
[exec] Result: 1
Build step 'Jenkins Text Finder' changed build result to UNSTABLE
Finished: UNSTABLE
--
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/95b6512e-0818-4a78-ba9a-b54034691bd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.