I am trying to use the Release Pipeline Gate
feature using an Invoke REST API
. I am getting the Response successfully, however, I have issues with the success criteria.
The result I am getting from the API Call:
{"projectStatus":{"status":"NONE","conditions":[],"periods":[]}}
Now the issue I am having is with setting up the criteria. If it was per say only {"status":"NONE","conditions":[],"periods":[]}
it would’ve been easy as eq(root['@status'], 'NONE')
would’ve worked, but what can I do in the case above?
I’ve tried absolutely everything and nothing works. I’ve followed a lot of examples but I couldn’t find an example like this one.
Could you please assist?
Advertisement
Answer
After many tests, I managed to find the solution:
eq(jsonpath(‘$.projectStatus.status’)[0],’NONE’)
Works flawlessly…