Hacker News new | past | comments | ask | show | jobs | submit login

It's a script run by a human when they want to push the changes in one environment to another. Our various apps consist of 3-10 repos. All the apps are backed by two shared lib repos (one for node lambdas, and one for C# lambdas). Merging each repo manually to do an environment push is cumbersome.

The script creates and merges pull requests on github for the lib repos and app repos - from one environment (branch) to another. First you have to do the lib repos, and if there are any changes wait for the CICD jobs to finish. If there are no changes to the libs, the script indicates that no pull requests were needed.

I have no idea how to get a local bash script to poll for when AWS CICD jobs are done, nor do I really want to spend days on that. So I just added that parameter to make sure I (and anyone following me) runs the lib merges first and waits for them to finish building before merging the app repos. The job without any flag just merges the lib repos.




Next time there is a HN thread about monorepos I think I'll just posts link to this comment.


On small fixes, it comes in handy to be able to separately deploy front end code, API Gateway code, or different back end lambda groups. But other times, like big feature additions, most of the repos have new changes, and I need to push an entire environment.

Part of this is an artifact of using lambdas and serverless.com. Serverless deploys all the lambda code in a repo to each lambda. It doesn't try to parse which code is shared. If I add too many lambdas to a repo, deploys take longer and I run into the AWS lambda code size limit.

But I also don't want a repo for each lambda because then I'd have to automate a ton of stuff that's currently manual, and for our tiny shop I think that would be overkill. We'd almost need a dedicated automation person.

We also have repos for several react front-end web apps, and the AWS API Gateway code that connects the front end to the back end. It's very common that I only deploy the react web-app. I have no idea how I would do that in a mono-repo that had all the front end, API Gateway and serverless.com/lambda code. I guess git tags? But I'd always be worried about screwing those up.


Why not create a draft PR on the app repos and tell user to merge it when lib builds are done?


It would be the same result. A human still has to wait for the lib builds to finish and then take action. This way there are two fully automated steps, with one human wait step in between them.


Yeah, but it will be a simpler script though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: