-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): filter affected projects by glob pattern on tags #8364
feat(core): filter affected projects by glob pattern on tags #8364
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/DeWDjQKthTYNcxLRDgRejKyL35m5 [Deployment for 8680f60 canceled] |
3a99403
to
334c230
Compare
7e2aa71
to
8680f60
Compare
Going to close this one out in favor of eventually moving forward with #10085 |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
ISSUES CLOSED: #2675
Current Behavior
When running affected command you only get
all
affected projects that have the target running affected forExpected Behavior
Can filter affected projects by glob patterns so that you can run a target for all affected projects who have a tag
scope*
(for example)Example:
There are two apps in the project
client
andapi
they are configured like so:Let's say they share a lib
dtos
, if we make a change indtos
and then runnx affected:apps
it should print outclient
andapi
(currently).What if we have two different CI machines, one does everything for servers and one does everything for apps. With this PR we could do:
A more complex example and what spurred this is, we have the need for some of our docker containers to be built on ARM resources and some to be built on x86 resources (there are definitely different ways to do this but this is just the situation that spurred this). Each of our servers could be tagged with
arm
orx86
then we could doThe
tags
flag accepts a glob pattern so you could so something like--tags "scope:*"
to run a target on all affected projects that have ascope
tag as well.Currently the CLI will accept
--tags=tag1,tag2,scope*
and thenAND
them together so a project is required to have a tag that matches all of the glob tags passed in. Not sure if this would be better as anOR
or have it as anexclude
withAND
orOR
. Open to ideas here.Related Issue(s)
Fixes #2675