Hey everyone
Long time no jenkins
I'm working on upgrading the digitalocean plugin to make it easier to select base images for agents by adding filters. I was thinking of getting fancy by added a repeatableHeteroProperty as filters as you can have 0 or more filters, and have classes for each filter type and how it would affect the api call.
After a lot of re-learning things, this seemed to work pretty well, except for the doFillItems call to populate the select box of images
Originally it was:
public ListBoxModel doFillImageIdItems(@RelativePath("..") @QueryParameter String authTokenCredentialId) throws Exception {
I was hoping to expand it to
public ListBoxModel doFillImageIdItems(@RelativePath("..") @QueryParameter String authTokenCredentialId, @QueryParameter List<ImageFilter> imageFilters) throws Exception {
But it seems like stapler doesn't like the conversion to list
java.lang.IllegalArgumentException: Unable to convert to interface java.util.List
Is there any way to handle this? I'd settle for a json blob or something i'd have to handle manually. I'm just not sure what my options are.
Thanks,
Gavin