I'm stuck getting that last one; the rest API for devops allows you to list releases, but that doesn't get you all the detailed info on a release, only the broad stuff. From that call, you can get the release id and make a 2nd call with that ID.
I don't even see the [ReleaseStatus] call being made in fiddler, just the [ReleaseList] call. WebParserDump.txt is never created. If I swap out the [ReleaseId] section substitution for the actual release Id it works.
Code: Select all
; Release Status ; Get overall release list first, to get ID of release [ReleaseList] Measure=WebParser URL=https://vsrm.#CoreServer#/#Organization#/#Project#/_apis/release/releases?$top=1&definitionId=#ReleaseDefinition#&api-version=5.1 Header=Content-Type: application/json Header2=Authorization: Basic #AccessToken# RegExp=(?siU)"id":(.*),.* ; Should just be int of release id [ReleaseId] Measure=WebParser URL=[ReleaseList] StringIndex=1 ; Use release id to get detailed info ; Get status of only the specified release environment [ReleaseStatus] Measure=WebParser URL=https://vsrm.#CoreServer#/#Organization#/#Project#/_apis/release/releases/[ReleaseId]?api-version=5.1 Header=Content-Type: application/json Header2=Authorization: Basic #AccessToken# Debug=2 RegExp=(?siU)"environments".*"name":"#ReleaseEnvironment#".*"status":"(.*)", [MeasureReleaseStatus] Measure=WebParser URL=[ReleaseStatus] StringIndex=1
How can I use the value of the first WebParser in a 2nd? Maybe something with dynamic variables? Wasn't able to get that working either. Bear with me, I'm new to this.
My backup plan is just to chuck all this code and write it as a plugin instead, since C# is what I do day to day, but I figured I'd at least give this a shot first.