Hi everyone, i’m setting up a quite peculiar Conti...
# general
c
Hi everyone, i’m setting up a quite peculiar Continuous integration job in a project that happens to not have access to the
./git
folder of its repository. So, i’m kind of trying to recreate the behavior of pants in regards to recognition of affected targets based on the changes. I want to recreate the command
pants --changed-since=origin/develop --changed-dependents=transitive test
Assuming that I have a text file with list of file paths (that represent my “--changed-since”). and i’m using the following command:
Copy code
cat .pipeline/changed-files | sed 's|/BUILD$|/|' | xargs pants dependents | xargs pants test
Which works reasonably well. The input file includes the BUILD files in its list, so i’m replacing them with the path of its directory in this case. I’m aware of some improvements that need to be done: • Identifying changes in
pants.toml
files, that should trigger all tests • Handling the transitive dependencies Anything else i might be forgetting? Do you have any hints? Thank you in advance
s
I think you need
... | xargs pants dependents --transitive | ...
c
Thank you @square-psychiatrist-19087. You are right!
s
You're welcome!