I’ve been tasked with building a freestyle project to build some firmware for a specialist device, the problem is the compiler tool used to compile the source files requires every file in the build to explicitly specified.
To give an example:
"thecompiler.exe file1.src file2.src file3.src"
What I’d like to be able to do is just have Jenkins gather a list of the “*.src” files in the current workspace folder into an environment variable, and then pass that variable to the compiler.
So for example
set filesstring = "file1.src file2.src file3.src" // from a freestyle build step *.src
"thecompiler ${filestring} /a /b /d"
That way when the devs add a new file to the build, I don’t need to edit the build configuration.
Please note, I have to do this using “freestyle” as the dev teams that will be responsible for looking after it once I finish my task, do not want to learn groovy, nor will their department head let them (I know, I know before anyone goes eh?? … those of you who have experienced office politics will know …)
Basically, they are ONLY allowed to use Jenkins if everything can be kept as nice and clicky web UI boxy ticky things as possible.
I do have some ideas on how to implement it in other ways, but I wanted to know if their might be a Jenkins native way to do it before I set myself down that path. The team are all .NET devs, so I’m thinking about building some external C# command line tools to do what I need, and just calling them from the build script.
Target system is a Windows 2016 Server Instance running Jenkins under open-jdk, the compiler is an EXE only, and will only run on windows (I’ve tried under wine… boom!)
In the same project I need to build and manipulate a Json file from a freestyle build step too, but that’s for another question once I solve this one