简体   繁体   中英

AZDO Release Pipeline Gate Success Criteria for Rest-API

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?

After many tests, I managed to find the solution:

eq(jsonpath('$.projectStatus.status')[0],'NONE')

Works flawlessly...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM