I get all parameters of a build using -
def myparams = currentBuild.rawBuild.getAction(ParametersAction).getParameters()
`myparams` is object of `java.util.Collections$UnmodifiableRandomAccessList` hence if try to add another parameter to it like -
myparams.add([$class: 'StringParameterValue', name: 'Test', value: "TestValue"])
then it fails with error -
java.lang.UnsupportedOperationException
Please guide how to add parameter to existing parameters.