Someone here at the company wrote a "System Groovy Script" that runs as a nightly job on master.
The code of the script, all 100 lines of it, is directly in the job configuration in the web interface.
I would like to get that code in a git repository, so that it's easy to roll back if needed, and also so that it is easier to read and write when I have the code open in IntelliJ.
What would be a "best practice" to do that?
I see that the Groovy plugin has only two options:
* code directly in the job config
* a groovy file, I assume somewhere in the job workspace, but that isn't specified.
Would I need another configuration before that? In "Source Code Management"?
How would you do it?