0
votes

I am looking for a way to produce all TFS Work Items from a Jenkins promote job.

We have an on prem deployment of TFS with service hooks in place to build the corresponding applications on check-in. The changeset Id is included with the notification, but I need the TFS work item for that Changeset.

More importantly - we will have several builds run; each with a singular changeset before we actuall run the promotion job.

What I would like to do is find a way to produce the list of TFS work items between releases. Looking a plug-in or tool that will help produce this.

1

1 Answers

0
votes

Update

You should first get the built changeset info in Jenkins side.

There seems to be a build.changeSets variable which could retrieve all the changeset.

Then you could directly use rest api in TFS to query work items info from changeset ID. Detail steps kindly take a look at here: How to retrieve work items associated to a build in jenkins with pipeline?


According to your description, seems you just want to get all work items between releases (for example: the current release and a previous release).

Retrieve work items by calling

https://{account}.vsrm.visualstudio.com/[teamproject]/_apis/Release/releases/{current release id}/workitems?api-version=4.1-preview.1&baseReleaseId={release id}

It just return the id, url of work items, and then you need to get details of work item through Get a list of work items REST API.