hey I’m super new to monorepo and tooling like `pa...
# general
w
hey I’m super new to monorepo and tooling like
pants
so I was wondering what’s the “recommended” way of doing a build docker image process. Right now I have my CI set to
lint
and
test
using the
--changed-since
flag and it works great. Now I’m adding the
bundle
step and that will generate the
.tar.gz
files that will then be added to a docker image. I’m wondering how I can “know” what dockerfiles should be built based on the projects that were actually bundled during the
bundle
step, I can probably do a bash script that gets the output from
dist
folder but is that what I should be doing or pants have some cool feature to trigger commands/scripts that I’m missing?
p
we solved this by adding a "resource" dependency from our services to the docker file and adding a tag to the resource
you can calculate all changed service and lookup their dependees and filter by the tag
w
that’s awesome
I’ll give that a try! Thanks!
h
Great suggestion, @plain-river-51682. Thanks for sharing! Thales, you may want to use a
files()
target instead. They’re really similar, except a
files()
target won’t be included in things like
binary
and it won’t have its “source root” stripped. It’s designed for arbitrary loose files. Also welcome! What languages are you using with Pants? And what version are you on? Let us know if you have any feedback or we can help with anything!
w
Thanks @hundreds-father-404! I’m using 1.30.0, only python code for now. I can’t use v2 due to my proxy using a self signed CA Cert, I think you were the one that answered me on a github issue about that so just excited to see that resolved on 2.0 🙂
💯 1