Nx: [Feature Request] affected whitelist projects

Created on 6 Aug 2019  路  6Comments  路  Source: nrwl/nx

  • [x] I am running the latest version
  • [x] I checked the documentation and found no answer
  • [x] I checked to make sure that this issue has not already been filed
  • [x] I'm reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

When running any affected command I would like to have an include option to whitelist projects.
My use case for this feature is CI related. We have 7 (and growing) apps in our workspace and we have to build each app in a separate parallel CI job (we use Gitlab CI). Now we only want to build the app if it is affected by our changes. Right now we can only use the exclude option listing all other apps. An include option would make the job configuration much easier for us.

I know we could run affected:build in parallel in a single job, but our job runners do not have enough power for this.

Current Behavior

There is only an exclude option for the affected commands.

feature

All 6 comments

Hi @sroettering!
Me and my team are experiencing the same issue. I proposed a feature request here: https://github.com/nrwl/nx/issues/1621
Would this meet your need as well?

I don't think excluding by tags solves my problem. For each app I would then have to add a tag to each other project (one which determines exclusion). Having n apps each app would end up with n-1 additional tags. Or did I miss something in your proposal?

@sroettering read the conversation there and associated issue (:

The tag-based whitelist approach would indeed solve my issue.

Closing this as the solution outlined in #1621 would solve this.

Feel free to re-open if needed.

This would be a very nice feature for projects which are not using tags yet.

For my use-case personally, to get this working, I need to fork and patch nx and implement the fix here. I then have to add an arbitrary tag to every project that has the same name as the project. Then I need to add --tags=[<app/lib name>] to every affected command in ci.

Was this page helpful?
0 / 5 - 0 ratings