In Jenkins we have jobs with REST List Parameter enabled and it uses our Docker Tags as REST endpoint:
Ex:
REST Endpoint: https://REPO_URL/v2/hello-world/tags/list
MIME type: APPLICATION JSON
Value Expression: $.tags
When manually curl the address we have as result:
{
"name" : "hello-world",
"tags" : [ "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "3", "4", "6", "7", "8", "9" ]
}
Versions (please complete the following information):
- Jenkins: 2.319.2
- Plugin: 1.5.0
- Browser: Firefox or Chrome
Additional context
JENKINS ERROR:
Error while serving http://JOB_URL/descriptorByName/io.jenkins.plugins.restlistparam.RestListParameterDefinition/testConfiguration
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
Caused: java.lang.reflect.InvocationTargetException
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:405)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:208)
There is other Job that it works and the JSON result is:
{
"name" : "image_name",
"tags" : [ "1.0.0-20210211101025", "1.0.0-20210211101625", "1.0.0-20210211101756", "1.0.0-20210211102118", "1.0.0-20210305142411", "1.0.0-20210309074905", "1.0.0-20210310065345", "1.0.0-20210312074331", "1.0.0-20210319065144", "1.0.0-20210324142526", "1.0.0-20210330073431", "1.0.0-20210426065757", "1.0.0-20210519113253", "1.0.0-49", "1.0.0-52", "1.0.0-53", "1.0.0-54", "1.0.0-latest" ]
}