Jenkins provides the option to run Groovy scripts, which makes it really easy to customize everything about…