I am trying to create a release without mapping a existing build in TFS/VSTS and get data display in release summary once it is completed. in plain text steps are following
- Release -> Empty Release Definition -> Add build task - > Create Release -> Deploy -> View Data in Summary Section
Summary data are view-able as expected without any issues with following two scenarios
- Build - > Create build definition -> Add task - > Save and Queue build – Build Success - > View Summary Data
- Release -> Empty Release Definition -> Link pre-defined Build definition -> Create Release -> provide successfully ran build version -> View Summary data.
As As per our understanding the issue occurs when we retrieving artifacts of the given release. We can retrieve results for builds but fail to do the same for releases. Below is the sample code we use to read release data. It will be much helpful if you can provide us guidance on retrieving artifacts details for given release. Right now we use following code in the client side for retrieving release artifacts but it complains release.artifacts is undefined. We have verified that the attachment file is saved to the given file location.
var c = VSS.getConfiguration();
c.onReleaseChanged(function (release) {
release.artifacts.forEach(function (art) {
var buildid = art.definitionReference.version.id;
// rest of the code is removed here
});
});
below are the references we followed to find solution,