fasterci / rules_gitops

Apache License 2.0
17 stars 6 forks source link

generate bazel targets to be executed as create_gitops_pr #6

Open apesternikov opened 1 year ago

apesternikov commented 1 year ago

Currently targets to deploy during create_gitops_prs run must be built just before the create_gitops_prs execution. This could be error prone and cause deploying of stale versions if targets parameter to create_gitops_prs is not synchronized exactly with targets to build. Also, there is currently impossible to investigate dependency tree of the deployment using bazel query. It would be useful to extract the initial step of targets discovery into a gazelle-like generator that would generate a target like this:

create_gitops_pr(
   name = "prod",
   deps = [
       "//package1:prod.gitops",
       "//package2:all.gitops",
   ]
)

running such target would be equivalent of building all dependencies and running create_gitops_prs on them.