feat(logan-terraform): add run-factory script
@sdw37, following your comments as part of the refinement of uis/devops/tools/logan#23 (closed) last week, it got me thinking about whether implementing the factory mode in the logan code itself is actually the right way to go. I appreciate this is a bit annoying as you've already spent quite a lot of time on that issue, however, as you rightly mentioned, logan
is supposed to simply be a "runner of things" and perhaps the level of customisation required for the factory mode is not a good idea.
Therefore, I have put this MR together to propose an alternative. It adds a standardised version of the ./run-product-factory.sh
script to the logan-terraform
image itself which can then be called as follows.
logan --workspace production run-factory -f example plan
I've tested this against both the gcp-product-factory
and gitlab-project-factory
projects and it seems to work as expected, and ultimately achieves the desired end-result of having a single script/tool for running these "factory" type repositories, rather than copying the same script around as we currently do.
Let me know what you think and if you agree that perhaps this is an easier/better way forward. @rjw57 I'd also be interested in your thoughts on this idea.