Jenkins – unable to resolve class utilities.MyUtilities

It’s more than likely, you start trying to import external classes/files if you use Jenkins Job DSL Plugin. When your jobs grow to tens or hundreds of projects, some code will be common in some places. So, you will read the documentation, check the community forums, try to find out the best way to simplify your life. And you find it. You will find very quickly, that you can import classes from external files. Jenkins DSL uses Groovy, and Groovy is based on Java, after all, so it’s not a surprise. After you find that information you will try to Continue reading

Variable as a Groovy map key

Maps are the structures which can be very helpful. I’m not a developer, so I’m sure that many of you will take this post with a grain of salt. Even though, If you use Jenkins, you can face the same problem I faced some time ago. My experience with Groovy is limited to Jenkins job DSL configuration, but I always try to create a configuration as simple as possible. So sometimes my scripts are full of loops, conditionals, and variables. In one of my job, I tried to use a map and create a nested loop, where one of the Continue reading