<#20899 Invoking pants in CI> New discussion creat...
# github-notifications
c
#20899 Invoking pants in CI New discussion created by jake-normal It is often desirable to write CI scripts in a "real programming language" like Python. Obviously, those scripts live in our monorepo, and at that point they might as well have access to all the other Python libraries in the repo, meaning they should be managed by Pants. Since they are typically simple scripts, we tend to invoke them in CI with Pants, like this:
Copy code
pants run deploy/deploy.py
Since these are CI scripts, they often need answers to questions about the code in the repo. Fortunately, Pants has helpful introspection features, and so these scripts often invoke Pants' introspection commands. Now, you effectively have Pants invoking Pants! And of course Pants only likes one instance of Pants running at any given time, though we can set concurrent to
True
to work around that. Does anything about this pattern seem weird to you? E.g. would it be better to create Python packages for these CI tools, build them, and then invoke them from the
dist
folder? Or is the pattern that we are following perfectly normal? pantsbuild/pants