Rewrite `scripts/deploy` script in Ruby
Description
Rewrite scripts/deploy script in Ruby. It is getting too complex for bash, and is hard to understand and maintain.
See !92505 (comment 710862734)
This should also be updated in the duplicate repos, the buyer experience and internal handbook projects.
Further discussion from the above thread:
Tyler Williams @tywilliams · 8 hours ago Author Maintainer Thanks, @cwoolley-gitlab! I agree for the most part (we should rewrite this in Ruby, not bloat with extra Bash functions).
I'm not too worried about cloning scripts between the three repos. Right now that's what I'm doing with Buyer Experience because it's easiest, but there's no reason necessarily that the script here needs to match Buyer Experience or internal handbook. We could rewrite Buyer Experience in JS and Internal in Ruby and as long as the final output is the same, I think it's all good at the end of the day.
Of course, I'm still just going to copy and paste into Buyer Experience for now, haha. Merging in!
Chad Woolley
Chad Woolley
Yes. I was going to make this same comment myself after thinking about it more, and remembering that the buyer experience repo is all JS-based and no Ruby.
However, I also remember that the standard rule for DRY (Don't Repeat Yourself) is: if you repeat something twice, hold your nose; if you repeat it three times, abstract it to a commonly reused place.
And we are now at three times for the deploy script (as soon as I set up review apps on the internal handbook) ;)
So I worry about the situation, just like the one in this MR, where we fix something important, but then we forget to copy it to the other repos, and even if we remember, have to re-implement it in a different language.