I am using Jenkins Build Token Root plugin for triggering a project via script. As per the documentation, we can send an optional parameter Type while triggering a job like this:
buildByToken/buildWithParameters?job=RevolutionTest&token=TacoTuesday&Type=Mexican
I need to access this Type value inside the jenkins pipeline. How can I get that ?
So far I have tried to use
def causes = currentBuild.rawBuild.getCauses()
sh 'echo Causes: ${causes}'
But that raises exception
java.io.NotSerializableException: hudson.model.Cause$RemoteCause