How to get build result in work item attribute
I am developing a follow up action to trigger a build when work item is in certain state, when work goes to "Deployment" state build is executed by plugin. I also want to record build results on the work item itself i.e. when build is finished executing its result pass/fail and Date should be updated on work item attribute.
As soon as build finishes execution its result should be updated in work item attribute but we are not sure how work item would know build has finished execution and result is available. Based on application build can take 45 mins to 90 mins for complete execution.
I was thinking of creating asynchronous task which would run in background in desired time interval and updated work item but it does not seem to be proper solution because results would not be immediately updated on work item when build is finished execution but it will be executed when asynchronous task is executed.
Is there any way I can record build result on work item attribute as soon as build finishes execution.
One answer
If you are using RTC 603 or above, you could explore using the updateworkitem ant task - https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.build.doc%2Ftopics%2Fr_updateworkitem.html. This ant task is part of the Jazz Build Toolkit.
In your Jenkins build once you get past the deployment step or may be once the build is done you could use the updateworkitem ant task to post the required updates to the corresponding workitem.
I am not sure about the kind of association between work items and deployment builds in your setup is it like every work item is associated with it's corresponding deployment build or there is a single work item to track all deployment builds. Like Ralph mentioned it is better to avoid storing the status of all the deployment builds in a single work item.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 13 '19, 9:47 a.m.vikrant kamble
Jun 13 '19, 11:36 a.m.vikrant kamble
Jun 13 '19, 11:39 a.m.Sridevi Sangaiah
JAZZ DEVELOPER Jun 14 '19, 2:52 a.m.vikrant kamble
Jun 14 '19, 3:53 a.m.