3 ms·
> And for those that are reading this, the statement about pipeline groovy being a trap is exactly right. Avoid writing groovy at all costs. I disagree with th
by bigstrat2003 3y ago
> And for those that are reading this, the statement about pipeline groovy being a trap is exactly right. Avoid writing groovy at all costs.
I disagree with this pretty strongly. I've worked with Jenkins where it was all freestyle jobs and it was a nightmare to maintain. Pipelines written in groovy are essential to doing Jenkins well, imo. It's also not exactly hard to write groovy. It's basically Java, not some weird esoteric language nobody knows.
- maratc 3y agoI'd suggest you wait until you spend a whole day on script approval and @NonCPS idiosyncrasies before you define Jenkins pipeline Groovy DSL as "basically Java". This doesn't mean you shouldn't be writing it, you should — but for the reasons completely different from its supposed "similarity to Java".
- Too 3y agoFor anyone who thinks JavaScript or yaml has funky implicit conversions and comparison rules, wait until you hear about “Groovy truth”. Theres also the limitation that functions can be max 1000 bytes or whatever I don’t remember. Managing shared libs and testing them is not easy. It’s not basically Java at all. Everything is subtly different and will surprise you in the least convenient moment.