Hey everyone! :jeans: we want to combine our exis...
# general
r
Hey everyone! 👖 we want to combine our existing libraries into a monorepo but are unsure about the deployment of individual applications once combined into a single repository. Our monorepo setup looks something like this:
Copy code
monorepo
    .git/
        workflows/
            ci.yml
            cd.yml
    applications/
        cli/
        web/
    library 1/
    library 2/
    library 3/
    ...
We want to deploy multiple applications from this repository. We build them using
pex
+
docker
and then deploy to
Cloud Run
through Google's
Artifact Registry
. Both the build and deployment steps are triggered through the GitHub Actions
cd.yml
. In a single repository deployment worked quite easily because there was only ever one application to deploy. However, in a monorepo setting there are multiple applications that can deployed and we only want to redeploy the applications that were changed (or that include libraries that were changed). How can it be communicated to GH actions which applications need to be redeployed and which ones not? And how can this one trigger the redeployment of only those applications in cd?
h
Have you looked at
--filter-*
with
--changed-since
and
--changed-dependents
flags? You can use that to find targets of specific types whose transitive dependencies have changed. See https://www.pantsbuild.org/2.19/reference/subsystems/filter and https://www.pantsbuild.org/2.19/reference/subsystems/changed