docs(core): remove nx connect flow from docs (#23204)
Recommend people log in to `nx.app` and connect their repository instead of running `nx connect` from the command line
This commit is contained in:
parent
d1c4073809
commit
53693fdd1c
@ -17,11 +17,7 @@ You get the **same level of security**, **dedicated support**, **SSO/SAML auth**
|
||||
|
||||
We also offer an uptime SLA guarantee of 99.98% for our Enterprise customers, SOC certificates on request, and we're happy to meet with your security teams if they have questions, or fill in security questionnaires. We also maintain a [Status Page here](https://status.nx.app/).
|
||||
|
||||
To start with this option, it's as easy as running
|
||||
|
||||
```shell
|
||||
npx nx connect
|
||||
```
|
||||
To start with this option, it's as easy as creating an account on [nx.app](https://cloud.nx.app) and connecting your repository.
|
||||
|
||||
### Single-tenant instance
|
||||
|
||||
|
||||
@ -12,9 +12,7 @@ Implementing an efficient CI setup for monorepos - while crucial - can be challe
|
||||
|
||||
## Try Nx Cloud Yourself!
|
||||
|
||||
```shell
|
||||
npx nx connect
|
||||
```
|
||||
[Create an account on Nx Cloud](https://cloud.nx.app) and connect your repository.
|
||||
|
||||
## Learn about Nx on CI
|
||||
|
||||
|
||||
@ -1041,31 +1041,65 @@ When you are ready to add another application to the repo, you'll probably want
|
||||
|
||||
You can also go through the full [Angular monorepo tutorial](/getting-started/tutorials/angular-monorepo-tutorial)
|
||||
|
||||
## Setup CI for the Angular App
|
||||
## Set Up CI for the Angular App
|
||||
|
||||
This tutorial walked you through how Nx can improve the developer experience for local development, but Nx can also make a big difference in CI. Without adequate tooling, CI times tend to grow exponentially with the size of the codebase. Nx helps reduce wasted time in CI with the [`affected` command](/ci/features/affected) and Nx Replay's [remote caching](/ci/features/remote-cache). Nx also [efficiently parallelizes tasks across machines](/ci/concepts/parallelization-distribution) with Nx Agents.
|
||||
This tutorial walked you through how Nx can improve the local development experience, but the biggest difference Nx makes is in CI. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
To set up Nx Cloud run:
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
### Generating a CI Workflow
|
||||
|
||||
If you are starting a new project, you can use the following command to generate a CI workflow file.
|
||||
|
||||
```shell
|
||||
nx connect
|
||||
```
|
||||
|
||||
And click the link provided. You'll need to follow the instructions on the website to sign up for your account.
|
||||
|
||||
Then you can set up your CI with the following command:
|
||||
|
||||
```shell
|
||||
nx generate ci-workflow --ci=github
|
||||
npx nx generate ci-workflow --ci=github
|
||||
```
|
||||
|
||||
{% callout type="note" title="Choose your CI provider" %}
|
||||
You can choose `github`, `circleci`, `azure`, `bitbucket-pipelines`, or `gitlab` for the `ci` flag.
|
||||
{% /callout %}
|
||||
|
||||
This will create a default CI configuration that sets up Nx Cloud to [use distributed task execution](/ci/features/distribute-task-execution). This automatically runs all tasks on separate machines in parallel wherever possible, without requiring you to manually coordinate copying the output from one machine to another.
|
||||
This generator creates a `.github/workflows/ci.yml` file that contains a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
Check out one of these detailed tutorials on setting up CI with Nx:
|
||||
The key line in the CI pipeline is:
|
||||
|
||||
```yml
|
||||
- run: npx nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
### Connecting to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e tests deflaking, better DX and more.
|
||||
|
||||
To connect to Nx Cloud:
|
||||
|
||||
- Commit and push your changes to GitHub
|
||||
- Go to [https://cloud.nx.app](https://cloud.nx.app), create an account, and connect your repository
|
||||
|
||||

|
||||
|
||||
`cloud.nx.app` will send a PR to your repository enabling Nx Cloud, after which caching, distribution and more will start working.
|
||||
|
||||

|
||||
|
||||
Once you merge that PR, you'll be able to see CI pipeline runs appearing in the Nx Cloud dashboard:
|
||||
|
||||

|
||||
|
||||
### Enable a Distributed CI Pipeline
|
||||
|
||||
The current CI pipeline runs on a single machine and can only handle small workspaces. To transform your CI into a CI that runs on multiple machines and can handle workspaces of any size, uncomment the `npx nx-cloud start-ci-run` line in the `.github/workflows/ci.yml` file.
|
||||
|
||||
```yml
|
||||
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
|
||||
@ -1245,31 +1245,65 @@ If you have the ESLint plugin installed in your IDE you should immediately see a
|
||||
|
||||
Learn more about how to [enforce module boundaries](/features/enforce-module-boundaries).
|
||||
|
||||
## Setup CI for Your Angular Monorepo
|
||||
## Set Up CI for Your Angular Monorepo
|
||||
|
||||
This tutorial walked you through how Nx can improve the developer experience for local development, but Nx can also make a big difference in CI. Without adequate tooling, CI times tend to grow exponentially with the size of the codebase. Nx helps reduce wasted time in CI with the [`affected` command](/ci/features/affected) and Nx Replay's [remote caching](/ci/features/remote-cache). Nx also [efficiently parallelizes tasks across machines](/ci/concepts/parallelization-distribution) with Nx Agents.
|
||||
This tutorial walked you through how Nx can improve the local development experience, but the biggest difference Nx makes is in CI. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
To set up Nx Cloud run:
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
### Generating a CI Workflow
|
||||
|
||||
If you are starting a new project, you can use the following command to generate a CI workflow file.
|
||||
|
||||
```shell
|
||||
nx connect
|
||||
```
|
||||
|
||||
And click the link provided. You'll need to follow the instructions on the website to sign up for your account.
|
||||
|
||||
Then you can set up your CI with the following command:
|
||||
|
||||
```shell
|
||||
nx generate ci-workflow --ci=github
|
||||
npx nx generate ci-workflow --ci=github
|
||||
```
|
||||
|
||||
{% callout type="note" title="Choose your CI provider" %}
|
||||
You can choose `github`, `circleci`, `azure`, `bitbucket-pipelines`, or `gitlab` for the `ci` flag.
|
||||
{% /callout %}
|
||||
|
||||
This will create a default CI configuration that sets up Nx Cloud to [use distributed task execution](/ci/features/distribute-task-execution). This automatically runs all tasks on separate machines in parallel wherever possible, without requiring you to manually coordinate copying the output from one machine to another.
|
||||
This generator creates a `.github/workflows/ci.yml` file that contains a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
Check out one of these detailed tutorials on setting up CI with Nx:
|
||||
The key line in the CI pipeline is:
|
||||
|
||||
```yml
|
||||
- run: npx nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
### Connecting to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e tests deflaking, better DX and more.
|
||||
|
||||
To connect to Nx Cloud:
|
||||
|
||||
- Commit and push your changes to GitHub
|
||||
- Go to [https://cloud.nx.app](https://cloud.nx.app), create an account, and connect your repository
|
||||
|
||||

|
||||
|
||||
`cloud.nx.app` will send a PR to your repository enabling Nx Cloud, after which caching, distribution and more will start working.
|
||||
|
||||

|
||||
|
||||
Once you merge that PR, you'll be able to see CI pipeline runs appearing in the Nx Cloud dashboard:
|
||||
|
||||

|
||||
|
||||
### Enable a Distributed CI Pipeline
|
||||
|
||||
The current CI pipeline runs on a single machine and can only handle small workspaces. To transform your CI into a CI that runs on multiple machines and can handle workspaces of any size, uncomment the `npx nx-cloud start-ci-run` line in the `.github/workflows/ci.yml` file.
|
||||
|
||||
```yml
|
||||
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
|
||||
@ -123,11 +123,7 @@ The cache is stored in `.nx/cache` by default. You can also [change where the ca
|
||||
|
||||
## Enable Remote Caching
|
||||
|
||||
You can enable remote caching (Nx Replay) by connecting to [Nx Cloud](/ci/features/remote-cache). To connect Nx to Nx Cloud run the following command:
|
||||
|
||||
```shell
|
||||
npx nx connect
|
||||
```
|
||||
You can enable remote caching (Nx Replay) by connecting to [Nx Cloud](/ci/features/remote-cache). To connect Nx to Nx Cloud, [create an account on cloud.nx.app](https://cloud.nx.app) and connect to your repository.
|
||||
|
||||
Learn more about [remote caching](/ci/features/remote-cache).
|
||||
|
||||
|
||||
@ -298,11 +298,7 @@ our [community page](https://nx.dev/community) for links to our Discord and Twit
|
||||
## Remote computation caching with Nx Cloud
|
||||
|
||||
To use Module Federation well, we recommend that you enable [Nx Cloud](https://nx.app). If you haven't enabled it yet
|
||||
when using `create-nx-workspace`, you can do the following.
|
||||
|
||||
```shell
|
||||
nx connect
|
||||
```
|
||||
when using `create-nx-workspace`, create an account at [https://cloud.nx.app](https://cloud.nx.app) and connect to your repository.
|
||||
|
||||
With Nx Cloud enabled, a large set of builds can be skipped entirely when running the application locally (and in
|
||||
CI/CD). When you run builds through Nx + Nx Cloud, the artifacts are stored in the remote cache, so as long as the
|
||||
|
||||
@ -153,5 +153,5 @@ For each `turbo.json` configuration property, the equivalent Nx property is list
|
||||
| `--cpuprofile` | Use [`NX_PROFILE=profile.json`](/troubleshooting/performance-profiling). |
|
||||
| `--verbosity` | Use [`--verbose`](/nx-api/nx/documents/run-many#verbose) |
|
||||
| `turbo gen` | [Use `nx generate`](/nx-api/nx/documents/generate) |
|
||||
| `turbo login` | No need. [Use `nx connect`](/nx-api/nx/documents/connect-to-nx-cloud) once to set up Nx Cloud. |
|
||||
| `turbo link` | [Use `nx connect`](/nx-api/nx/documents/connect-to-nx-cloud) |
|
||||
| `turbo login` | No need. [Create an Nx Cloud account](/nx-api/nx/documents/connect-to-nx-cloud) once to set up Nx Cloud. |
|
||||
| `turbo link` | [Create an Nx Cloud account](/nx-api/nx/documents/connect-to-nx-cloud) |
|
||||
|
||||
@ -853,31 +853,65 @@ When you are ready to add another application to the repo, you'll probably want
|
||||
|
||||
You can also go through the full [React monorepo tutorial](/getting-started/tutorials/react-monorepo-tutorial)
|
||||
|
||||
## Setup CI for Your React App
|
||||
## Set Up CI for Your React App
|
||||
|
||||
This tutorial walked you through how Nx can improve the developer experience for local development, but Nx can also make a big difference in CI. Without adequate tooling, CI times tend to grow exponentially with the size of the codebase. Nx helps reduce wasted time in CI with the [`affected` command](/ci/features/affected) and Nx Replay's [remote caching](/ci/features/remote-cache). Nx also [efficiently parallelizes tasks across machines](/ci/concepts/parallelization-distribution) with Nx Agents.
|
||||
This tutorial walked you through how Nx can improve the local development experience, but the biggest difference Nx makes is in CI. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
To set up Nx Cloud run:
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
### Generating a CI Workflow
|
||||
|
||||
If you are starting a new project, you can use the following command to generate a CI workflow file.
|
||||
|
||||
```shell
|
||||
nx connect
|
||||
```
|
||||
|
||||
And click the link provided. You'll need to follow the instructions on the website to sign up for your account.
|
||||
|
||||
Then you can set up your CI with the following command:
|
||||
|
||||
```shell
|
||||
nx generate ci-workflow --ci=github
|
||||
npx nx generate ci-workflow --ci=github
|
||||
```
|
||||
|
||||
{% callout type="note" title="Choose your CI provider" %}
|
||||
You can choose `github`, `circleci`, `azure`, `bitbucket-pipelines`, or `gitlab` for the `ci` flag.
|
||||
{% /callout %}
|
||||
|
||||
This will create a default CI configuration that sets up Nx Cloud to [use distributed task execution](/ci/features/distribute-task-execution). This automatically runs all tasks on separate machines in parallel wherever possible, without requiring you to manually coordinate copying the output from one machine to another.
|
||||
This generator creates a `.github/workflows/ci.yml` file that contains a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
Check out one of these detailed tutorials on setting up CI with Nx:
|
||||
The key line in the CI pipeline is:
|
||||
|
||||
```yml
|
||||
- run: npx nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
### Connecting to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e tests deflaking, better DX and more.
|
||||
|
||||
To connect to Nx Cloud:
|
||||
|
||||
- Commit and push your changes to GitHub
|
||||
- Go to [https://cloud.nx.app](https://cloud.nx.app), create an account, and connect your repository
|
||||
|
||||

|
||||
|
||||
`cloud.nx.app` will send a PR to your repository enabling Nx Cloud, after which caching, distribution and more will start working.
|
||||
|
||||

|
||||
|
||||
Once you merge that PR, you'll be able to see CI pipeline runs appearing in the Nx Cloud dashboard:
|
||||
|
||||

|
||||
|
||||
### Enable a Distributed CI Pipeline
|
||||
|
||||
The current CI pipeline runs on a single machine and can only handle small workspaces. To transform your CI into a CI that runs on multiple machines and can handle workspaces of any size, uncomment the `npx nx-cloud start-ci-run` line in the `.github/workflows/ci.yml` file.
|
||||
|
||||
```yml
|
||||
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
|
||||
@ -1072,31 +1072,65 @@ If you have the ESLint plugin installed in your IDE you should immediately see a
|
||||
|
||||
Learn more about how to [enforce module boundaries](/features/enforce-module-boundaries).
|
||||
|
||||
## Setup CI for Your React Monorepo
|
||||
## Set Up CI for Your React Monorepo
|
||||
|
||||
This tutorial walked you through how Nx can improve the developer experience for local development, but Nx can also make a big difference in CI. Without adequate tooling, CI times tend to grow exponentially with the size of the codebase. Nx helps reduce wasted time in CI with the [`affected` command](/ci/features/affected) and Nx Replay's [remote caching](/ci/features/remote-cache). Nx also [efficiently parallelizes tasks across machines](/ci/concepts/parallelization-distribution) with Nx Agents.
|
||||
This tutorial walked you through how Nx can improve the local development experience, but the biggest difference Nx makes is in CI. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
To set up Nx Cloud run:
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
### Generating a CI Workflow
|
||||
|
||||
If you are starting a new project, you can use the following command to generate a CI workflow file.
|
||||
|
||||
```shell
|
||||
nx connect
|
||||
```
|
||||
|
||||
And click the link provided. You'll need to follow the instructions on the website to sign up for your account.
|
||||
|
||||
Then you can set up your CI with the following command:
|
||||
|
||||
```shell
|
||||
nx generate ci-workflow --ci=github
|
||||
npx nx generate ci-workflow --ci=github
|
||||
```
|
||||
|
||||
{% callout type="note" title="Choose your CI provider" %}
|
||||
You can choose `github`, `circleci`, `azure`, `bitbucket-pipelines`, or `gitlab` for the `ci` flag.
|
||||
{% /callout %}
|
||||
|
||||
This will create a default CI configuration that sets up Nx Cloud to [use distributed task execution](/ci/features/distribute-task-execution). This automatically runs all tasks on separate machines in parallel wherever possible, without requiring you to manually coordinate copying the output from one machine to another.
|
||||
This generator creates a `.github/workflows/ci.yml` file that contains a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
Check out one of these detailed tutorials on setting up CI with Nx:
|
||||
The key line in the CI pipeline is:
|
||||
|
||||
```yml
|
||||
- run: npx nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
### Connecting to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e tests deflaking, better DX and more.
|
||||
|
||||
To connect to Nx Cloud:
|
||||
|
||||
- Commit and push your changes to GitHub
|
||||
- Go to [https://cloud.nx.app](https://cloud.nx.app), create an account, and connect your repository
|
||||
|
||||

|
||||
|
||||
`cloud.nx.app` will send a PR to your repository enabling Nx Cloud, after which caching, distribution and more will start working.
|
||||
|
||||

|
||||
|
||||
Once you merge that PR, you'll be able to see CI pipeline runs appearing in the Nx Cloud dashboard:
|
||||
|
||||

|
||||
|
||||
### Enable a Distributed CI Pipeline
|
||||
|
||||
The current CI pipeline runs on a single machine and can only handle small workspaces. To transform your CI into a CI that runs on multiple machines and can handle workspaces of any size, uncomment the `npx nx-cloud start-ci-run` line in the `.github/workflows/ci.yml` file.
|
||||
|
||||
```yml
|
||||
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
|
||||
@ -192,7 +192,6 @@ NX Next steps:
|
||||
- You opted out of some migrations for now. Write the following command down somewhere to apply these migrations later:
|
||||
- nx migrate 16.5.3 --from nx@16.1.0-beta.0 --exclude-applied-migrations
|
||||
- To learn more go to https://nx.dev/recipes/other/advanced-update
|
||||
- You may run 'pnpm run nx connect' to get faster builds, GitHub integration, and more. Check out https://nx.app
|
||||
```
|
||||
|
||||
You can see in the "Next steps" section a suggested command to run to apply the skipped package updates. Make sure to store that information somewhere so you can later remember from which version you need to run the migration to apply the skipped package updates.
|
||||
|
||||
@ -377,31 +377,65 @@ nx release --first-release
|
||||
|
||||
After this first release, you can remove the `--first-release` flag and just run `nx release --dry-run`. There is also a [dedicated feature page](/features/manage-releases) that goes into more detail about how to use the `nx release` command.
|
||||
|
||||
## Setup CI for Your NPM Workspace
|
||||
## Set Up CI for Your NPM Workspace
|
||||
|
||||
This tutorial walked you through how Nx can improve the developer experience for local development, but Nx can also make a big difference in CI. Without adequate tooling, CI times tend to grow exponentially with the size of the codebase. Nx helps reduce wasted time in CI with the [`affected` command](/ci/features/affected) and Nx Replay's [remote caching](/ci/features/remote-cache). Nx also [efficiently parallelizes tasks across machines](/ci/concepts/parallelization-distribution) with Nx Agents.
|
||||
This tutorial walked you through how Nx can improve the local development experience, but the biggest difference Nx makes is in CI. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
To set up Nx Replay run:
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
### Generate a CI Workflow
|
||||
|
||||
If you are starting a new project, you can use the following command to generate a CI workflow file.
|
||||
|
||||
```shell
|
||||
nx connect
|
||||
```
|
||||
|
||||
And click the link provided. You'll need to follow the instructions on the website to sign up for your account.
|
||||
|
||||
Then you can set up your CI with the following command:
|
||||
|
||||
```shell
|
||||
nx generate ci-workflow --ci=github
|
||||
npx nx generate ci-workflow --ci=github
|
||||
```
|
||||
|
||||
{% callout type="note" title="Choose your CI provider" %}
|
||||
You can choose `github`, `circleci`, `azure`, `bitbucket-pipelines`, or `gitlab` for the `ci` flag.
|
||||
{% /callout %}
|
||||
|
||||
This will create a default CI configuration that sets up Nx Cloud to [use distributed task execution](/ci/features/distribute-task-execution). This automatically runs all tasks on separate machines in parallel wherever possible, without requiring you to manually coordinate copying the output from one machine to another.
|
||||
This generator creates a `.github/workflows/ci.yml` file that contains a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
Check out one of these detailed tutorials on setting up CI with Nx:
|
||||
The key line in the CI pipeline is:
|
||||
|
||||
```yml
|
||||
- run: npx nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
### Connect to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e tests deflaking, better DX and more.
|
||||
|
||||
To connect to Nx Cloud:
|
||||
|
||||
- Commit and push your changes to GitHub
|
||||
- Go to [https://cloud.nx.app](https://cloud.nx.app), create an account, and connect your repository
|
||||
|
||||

|
||||
|
||||
`cloud.nx.app` will send a PR to your repository enabling Nx Cloud, after which caching, distribution and more will start working.
|
||||
|
||||

|
||||
|
||||
Once you merge that PR, you'll be able to see CI pipeline runs appearing in the Nx Cloud dashboard:
|
||||
|
||||

|
||||
|
||||
### Enable a Distributed CI Pipeline
|
||||
|
||||
The current CI pipeline runs on a single machine and can only handle small workspaces. To transform your CI into a CI that runs on multiple machines and can handle workspaces of any size, uncomment the `npx nx-cloud start-ci-run` line in the `.github/workflows/ci.yml` file.
|
||||
|
||||
```yml
|
||||
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
|
||||
@ -866,31 +866,65 @@ Learn more about how to [enforce module boundaries](/features/enforce-module-bou
|
||||
|
||||
When you are ready to add another application to the repo, you'll probably want to move `myvueapp` to its own folder. To do this, you can run the [`convert-to-monorepo` generator](/nx-api/workspace/generators/convert-to-monorepo) or [manually move the configuration files](/recipes/tips-n-tricks/standalone-to-integrated).
|
||||
|
||||
## Setup CI for Your Vue App
|
||||
## Set Up CI for Your Vue App
|
||||
|
||||
This tutorial walked you through how Nx can improve the developer experience for local development, but Nx can also make a big difference in CI. Without adequate tooling, CI times tend to grow exponentially with the size of the codebase. Nx helps reduce wasted time in CI with the [`affected` command](/ci/features/affected) and Nx Replay's [remote caching](/ci/features/remote-cache). Nx also [efficiently parallelizes tasks across machines](/ci/concepts/parallelization-distribution) with Nx Agents.
|
||||
This tutorial walked you through how Nx can improve the local development experience, but the biggest difference Nx makes is in CI. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
To set up Nx Cloud run:
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
### Generating a CI Workflow
|
||||
|
||||
If you are starting a new project, you can use the following command to generate a CI workflow file.
|
||||
|
||||
```shell
|
||||
nx connect
|
||||
```
|
||||
|
||||
And click the link provided. You'll need to follow the instructions on the website to sign up for your account.
|
||||
|
||||
Then you can set up your CI with the following command:
|
||||
|
||||
```shell
|
||||
nx generate ci-workflow --ci=github
|
||||
npx nx generate ci-workflow --ci=github
|
||||
```
|
||||
|
||||
{% callout type="note" title="Choose your CI provider" %}
|
||||
You can choose `github`, `circleci`, `azure`, `bitbucket-pipelines`, or `gitlab` for the `ci` flag.
|
||||
{% /callout %}
|
||||
|
||||
This will create a default CI configuration that sets up Nx Cloud to [use distributed task execution](/ci/features/distribute-task-execution). This automatically runs all tasks on separate machines in parallel wherever possible, without requiring you to manually coordinate copying the output from one machine to another.
|
||||
This generator creates a `.github/workflows/ci.yml` file that contains a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
Check out one of these detailed tutorials on setting up CI with Nx:
|
||||
The key line in the CI pipeline is:
|
||||
|
||||
```yml
|
||||
- run: npx nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
### Connecting to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e tests deflaking, better DX and more.
|
||||
|
||||
To connect to Nx Cloud:
|
||||
|
||||
- Commit and push your changes to GitHub
|
||||
- Go to [https://cloud.nx.app](https://cloud.nx.app), create an account, and connect your repository
|
||||
|
||||

|
||||
|
||||
`cloud.nx.app` will send a PR to your repository enabling Nx Cloud, after which caching, distribution and more will start working.
|
||||
|
||||

|
||||
|
||||
Once you merge that PR, you'll be able to see CI pipeline runs appearing in the Nx Cloud dashboard:
|
||||
|
||||

|
||||
|
||||
### Enable a Distributed CI Pipeline
|
||||
|
||||
The current CI pipeline runs on a single machine and can only handle small workspaces. To transform your CI into a CI that runs on multiple machines and can handle workspaces of any size, uncomment the `npx nx-cloud start-ci-run` line in the `.github/workflows/ci.yml` file.
|
||||
|
||||
```yml
|
||||
- run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user