Gradle enterprise query syntax


(Yi Cheng) #1

Hi,

Where can I find query syntax for gradle enterprise. For example, I want to find builds by user != CI, as it appears it does not have the negate function?

Thanks,
Yi


(François Guillot) #2

Hi @wisechengyi

The documentation of the export API can be found at https://docs.gradle.com/enterprise/export-api.

In particular, the last example can be adapted to filter based on the user tags.
You can also filter the stream to return only events you’re interested in.

Note that currently, any logic based on the event’s data has to be done after the data has been queried i.e. here, you have to query the UserTag events, and then check yourself if the data they contain matches what you want.

François


(Yi Cheng) #3

Thanks for the info, @Francois_Guillot!

IIUC, this is for the export api, which is definitely good to know since I will be working with that as well. Although I was mostly asking from the perspective of the gradle enterprise web GUI, wonder if there is anything I can do there as well.

Thanks,
Yi


(François Guillot) #4

Hi,

Sorry I didn’t understand your question.
If you’re talking about the scan list, you can get query examples by hovering over the “i” icons near some filter.
eg for tags:


So if you’re defining a CI tag with sth like

buildScan {
    if (System.getenv('CI')) {
        tag 'CI'
    }
}

you can query for the builds that don’t have that tag with


(Yi Cheng) #5

That’ll do. Thank you!