How Can I Use Projen for Managing Multiple Repositories?

0
2
Asked By TechExplorer42 On

Hey everyone! I'm considering pitching Projen as a solution for managing updates across about 10 repositories in our organization. All of these repos share a similar structure with a `Makefile`, `docker-compose.yaml`, and some Python scripts that have only minor variations. It's been quite a hassle ensuring that each implementation in a pull request is accurate, and it's time-consuming to create and apply these changes.

I'm thinking about setting up a custom `Project` in Projen within one repo to generate all the necessary files. This would allow me to synthesize each repository we manage using Projen. I plan to create a directory for each repository and use the `multi-gitter` tool to create pull requests for the changes in the corresponding directories.

Is this approach solid, or is there a more effective way to utilize Projen for distributing files among these repositories? I'm also considering options like extending a `GithubProject`, pushing a Python package to Code Artifact, and having a Github Action in each repository managed by the `GithubProject` to automate updates. This latter option seems a bit more complicated but could ensure that all templates are read-only, easing maintenance. I'm primarily leaning towards the `multi-gitter` method to start off and then transition to the Github Action approach later. But I'm open to hearing any other suggestions you might have!

3 Answers

Answered By CodeWizard77 On

Are the target repositories Python-based? If so, have you thought about extending a TypeScript project? I personally recommend that approach since Projen automates a lot, like setting up release workflows to CodeArtifact. This way, you get to keep your Projen-managed repos updated with your central templates easily. Plus, teams can still customize their Projen-managed files as needed.

Answered By DevDynamo93 On

Interesting idea! I hadn’t considered the Python project route because I was focused on using UV. But that does sound promising! I'll definitely look into it further. Thanks for the tip!

CodeWizard77 -

Glad you found it helpful! Just be cautious because I recently found out the PythonProject doesn't support CodeArtifact. But I'd love to share specific examples of how to automate updates if you want!

Answered By MavenMaestro On

The method you suggested is a decent start! But if you decide to pursue the `GithubAction` path, ensure you lay out how your workflow will look. This could streamline the process significantly and ease maintenance for your templates in the long run.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.