Hacker News new | ask | show | jobs
by hiAndrewQuinn 44 days ago
You can always just split the difference and call your shell script with

    sh "./whatever.sh"`
if you want in a modern Jenkinsfile. It's really not that big of a deal to avoid Groovy if you truly cannot stand it.

As for cron, that's also supported out of the box.

    triggers {
            cron('0 0 * * *')
        }
At that point Jenkins is mostly acting as a nice frontend to all those cronjobs and shell scripts, but at least it keeps records of all the logs etc.
2 comments

It's all fun and shells until you start adding parameters especially when those parameters have quotemarks in them. Groovy can get pretty wild with the syntax.
Oh brother don’t think I don’t know how to “work around” anyone else’s favorite tool.

I guess I should be happy it isn’t CA Unicenter.

See it how you wish; but shell script execution was part of Jenkins from day 1, to my knowledge, over 20 years ago now. It's a 'workaround' the same way walking upstairs is a workaround for an escalator, imo.
Oh I know it! I was slighting Groovy when the old fashion way always worked just fine!

Didn’t mean to draw it out as “one of those” battles.

Cheers!