Unfortunately this explains most problems with evolving software applications. You see a problem, and you KNOW it would be much better solved with e.g. a rewrite into a proper programming language, but as a developer (and manager) you have to make the tradeoff; spend five minutes adding an IF to a yaml file, or five months rebuilding the whole CI to allow for conditionals.
I'm currently in tradeoff mode as well. Do I spend a month copy / pasting some shit code in the existing codebase so that I can spend the rest of the year on the project rebuilding things, or should I pause the rebuild project and instead clean up the existing one (effectively a rebuild-in-place).
I'm currently in tradeoff mode as well. Do I spend a month copy / pasting some shit code in the existing codebase so that I can spend the rest of the year on the project rebuilding things, or should I pause the rebuild project and instead clean up the existing one (effectively a rebuild-in-place).