feat(sage-monorepo): create nx plugin for the monorepo #2890
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Create a local Nx plugin to centralize the definition of the task
build-image
for the OC projects. Ultimately, this framework will Enforce Organizational Best Practices with a Local Plugin.Changelog
sage-monorepo/nx-plugin
build-image
to projects that meet the conditionsbuild-image
from theproject.json
fileslocal
andci
to the taskbuild-image
of the OC projectsnx.json
jsonc-eslint-parser
(suggested when generating the Nx plugin)Notes
Generate the Nx plugin
Example: Dynamically define the dependencies of the task
build-image
When running the
build-image
task, its dependencies must be completed first. For an Angular project, this means the app must be built with thebuild
task before the Docker image is created withbuild-image
. This PR implements the logic shown below that covers all project types currently in the monorepo. Note that task names and dependencies may be adjusted in future PRs for further standardization.Preview
How do I know which task is available for a given project?
nx show project openchallenges-apex --web
This will open the page shown below in your browser.
Docker images build locally
The same images are built compared to before the creation of this PR. What has changed is that the definition of the task
build-image
has been centralized in the Nx plugin.References