You can do the same in jenkins, but a bit of scripting is probably more readable in Groovy than whatever Yaml dsl.
But I totally agree that the Jenkins langs are terrible, the errors even worse, somehow they managed to make jvm backtraces even more unreadable.