Skip to content

Commit 80822c6

Browse files
aninibreadhyperlint-ai[bot]irvinebroquekodster28ToriLindsay
authored
Anni/wcicd new features (#17762)
* Adding docs for Workers CI/CD in Closed Beta * Deleting redundant CI/CD related pages. Deleted content has been moved to the new CI/CD docs. * Update src/content/docs/workers/ci-cd/build-system/build-configuration.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/ci-cd/build-system/build-configuration.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/ci-cd/build-system/build-configuration.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/ci-cd/build-system/build-configuration.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/ci-cd/index.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/ci-cd/index.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Added link reference for Wrangler environments. * Added Build Limits to Overview Page. * added more to troubleshooting page * Update src/content/docs/workers/ci-cd/build-system/troubleshoot.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * Update src/content/docs/workers/ci-cd/build-system/troubleshoot.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * Update src/content/docs/workers/ci-cd/build-system/build-configuration.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * Remove wordy description in Builds index.mdx * remaning section to builds from build system * Referencing Builds instead of Build System * Adding reference for Wrangler Environments * Change reference of Workers build system to Workers Builds * Few tweaks * New change in release now includes non-'Main' branch support. * Improve instructions for monorepo and wrangler env support. * adding back some tweaks * Updating build image page and header * Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/workers/ci-cd/builds/index.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * small tweaks + note in change log * small tweaks * Update src/content/docs/workers/ci-cd/index.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * Update src/content/docs/workers/ci-cd/builds/index.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * Update src/content/docs/workers/ci-cd/builds/troubleshoot.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * Update src/content/docs/workers/ci-cd/builds/troubleshoot.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * adding suggested changes * Update src/content/docs/workers/ci-cd/builds/index.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/builds/index.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/external-cicd.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/builds/build-image.mdx Co-authored-by: ToriLindsay <[email protected]> * why cicd changes * redirect and link updates * add pre-installed packages section * add images, diagrams, and examples * Build setting details and changes * adding in default version update message * adding troubleshooting view * nevi edits to anni's builds PR (#16962) * nevi edits to anni's builds PR * 9-20 changes * trigger builds * Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx Co-authored-by: Brendan Irvine-Broque <[email protected]> * added git integration + individual external ci/cd pages + small tweaks * Update src/content/docs/workers/ci-cd/builds/configuration.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Link fixes * Added a which ci/cd should i choose section. Added fix to git integration * Update src/content/docs/workers/ci-cd/builds/build-image.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * versions updates and added git troubleshooting * small edit * edit on getting started * removing enterprise from pricing plan * fix index * added change log for workers builds * spelling mistake * Update src/content/docs/pages/configuration/git-integration.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/pages/configuration/git-integration.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/pages/configuration/git-integration.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/pages/configuration/git-integration.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/builds/advanced-setups.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/index.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/index.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/ci-cd/index.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/configuration/versions-and-deployments/index.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/workers/wrangler/deprecations.mdx Co-authored-by: ToriLindsay <[email protected]> * existing Worker distinction * small fix * reverting github actions workflow change * change page setup * Added build caching and build watch paths for Workers and updated the same pages for Pages * fix merge conflict marker * Revert "change page setup" This reverts commit 9523cad. * fix github actions merge conflict --------- Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> Co-authored-by: Brendan Irvine-Broque <[email protected]> Co-authored-by: kodster28 <[email protected]> Co-authored-by: ToriLindsay <[email protected]> Co-authored-by: Nevi Shah <[email protected]> Co-authored-by: Daniel <[email protected]>
1 parent cf425ac commit 80822c6

File tree

7 files changed

+154
-28
lines changed

7 files changed

+154
-28
lines changed

src/content/docs/pages/configuration/build-caching.mdx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To enable build caching in the Cloudflare dashboard:
1818
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
1919
2. In Account Home, select **Workers & Pages**.
2020
3. In **Overview**, select your Pages project.
21-
4. Go to **Settings** > **Builds & deployments** > **Build cache** and select **Enable build cache**.
21+
4. Go to **Settings** > **Build** > **Build cache** and select **Enable**.
2222

2323
### Clear cache
2424

@@ -27,8 +27,8 @@ The build cache can be cleared for a project if needed, such as when debugging b
2727
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
2828
2. In Account Home, select **Workers & Pages**.
2929
3. In **Overview**, select your Pages project.
30-
4. Go to **Settings** > **Builds & deployments** > **Build cache**.
31-
5. Select **Clear cache** to clear the build cache.
30+
4. Go to **Settings** > **Build** > **Build cache**.
31+
5. Select **Clear Cache** to clear the build cache.
3232

3333
## How build caching works
3434

@@ -58,11 +58,7 @@ Caching the build output from frameworks can speed up subsequent build times. Th
5858

5959
## Limits
6060

61-
During this beta period, the following limits are imposed:
61+
The following limits are imposed for build caching:
6262

6363
- **Retention**: Cache is purged seven days after its last read date. Unread cache artifacts are purged seven days after creation.
6464
- **Storage**: Every project is allocated 10 GB. If the project cache exceeds this limit, the project will automatically start deleting artifacts that were read least recently.
65-
66-
## Feedback
67-
68-
If there are package managers or frameworks you want to see supported, let us know in the Pages channel of the [Cloudflare Developer Discord](https://discord.com/invite/cloudflaredev).
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
---
22
pcx_content_type: concept
33
title: Build watch paths
4-
54
---
65

76
When you connect a git repository to Pages, by default a change to any file in the repository will trigger a Pages build. You can configure Pages to include or exclude specific paths to specify if Pages should skip a build for a given path. This can be especially helpful if you are using a monorepo project structure and want to limit the amount of builds being kicked off.
87

98
## Configure paths
109

11-
To configure which paths are included and excluded, go to your Pages project > Settings > Builds & deployments > Build watch paths. Pages will default to setting your project’s includes paths to everything (\[\*]) and excludes paths to nothing (`[]`).
10+
To configure which paths are included and excluded:
11+
12+
1. In **Overview**, select your Pages project.
13+
2. Go to **Settings** > **Build** > **Build watch paths**. Pages will default to setting your project’s includes paths to everything (\[\*]) and excludes paths to nothing (`[]`).
1214

1315
The configuration fields can be filled in two ways:
1416

15-
* **Static filepaths**: Enter the precise name of the file you are looking to include or exclude (for example, `docs/README.md`).
16-
* **Wildcard syntax:** Use wildcards to match multiple path directories. You can specify wildcards at the start or end of your rule.
17+
- **Static filepaths**: Enter the precise name of the file you are looking to include or exclude (for example, `docs/README.md`).
18+
- **Wildcard syntax:** Use wildcards to match multiple path directories. You can specify wildcards at the start or end of your rule.
1719

1820
:::note[Wildcard syntax]
1921

20-
2122
A wildcard (`*`) is a character that is used within rules. It can be placed alone to match anything or placed at the start or end of a rule to allow for better control over branch configuration. A wildcard will match zero or more characters.For example, if you wanted to match all branches that started with `fix/` then you would create the rule `fix/*` to match strings like `fix/1`, `fix/bugs`or `fix/`.
2223

23-
2424
:::
2525

2626
For each path in a push event, build watch paths will be evaluated as follows:
2727

28-
* Paths satisfying excludes conditions are ignored first
29-
* Any remaining paths are checked against includes conditions
30-
* If any matching path is found, a build is triggered. Otherwise the build is skipped
28+
- Paths satisfying excludes conditions are ignored first
29+
- Any remaining paths are checked against includes conditions
30+
- If any matching path is found, a build is triggered. Otherwise the build is skipped
3131

3232
Pages will bypass the path matching for a push event and default to building the project if:
3333

34-
* A push event contains 0 file changes, in case a user pushes a empty push event to trigger a build
35-
* A push event contains 3000+ file changes or 20+ commits
34+
- A push event contains 0 file changes, in case a user pushes a empty push event to trigger a build
35+
- A push event contains 3000+ file changes or 20+ commits
3636

3737
## Examples
3838

3939
### Example 1
4040

4141
If you want to trigger a build from all changes within a set of directories, such as all changes in the folders `project-a/` and `packages/`
4242

43-
* Include paths: `project-a/*, packages/*`
44-
* Exclude paths: \`\`
43+
- Include paths: `project-a/*, packages/*`
44+
- Exclude paths: \`\`
4545

4646
### Example 2
4747

4848
If you want to trigger a build for any changes, but want to exclude changes to a certain directory, such as all changes in a docs/ directory
4949

50-
* Include paths: `*`
51-
* Exclude paths: `docs/*`
50+
- Include paths: `*`
51+
- Exclude paths: `docs/*`
5252

5353
### Example 3
5454

5555
If you want to trigger a build for a specific file or specific filetype, for example all files ending in `.md`.
5656

57-
* Include paths: `*.md`
58-
* Exclude paths: \`\`
57+
- Include paths: `*.md`
58+
- Exclude paths: \`\`

src/content/docs/workers/ci-cd/builds/advanced-setups.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pcx_content_type: reference
33
title: Advanced Setups
44
description: Learn how to use Workers Builds with more advanced setups
55
sidebar:
6-
order: 5
6+
order: 7
77
---
88

99
## Monorepos
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
pcx_content_type: concept
3+
title: Build caching
4+
description: Improve build times by caching build outputs and dependencies
5+
sidebar:
6+
order: 5
7+
---
8+
9+
Improve Workers Builds build times by turning on build caching to restore dependencies and build output between builds. The first build to occur after enabling build caching on your Pages project will save to cache. Every subsequent build will restore from cache unless configured otherwise.
10+
11+
## Configuration
12+
13+
### Enable build caching
14+
15+
To enable build caching in the Cloudflare dashboard:
16+
17+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
18+
2. In Account Home, select **Workers & Pages**.
19+
3. In **Overview**, select your Workers project.
20+
4. Go to **Settings** > **Build** > **Build cache** and select **Enable**.
21+
22+
### Clear cache
23+
24+
The build cache can be cleared for a project when needed, such as when debugging build issues. To clear the build cache:
25+
26+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
27+
2. In Account Home, select **Workers & Pages**.
28+
3. In **Overview**, select your Workers project.
29+
4. Go to **Settings** > **Build** > **Build cache**.
30+
5. Select **Clear Cache** to clear the build cache.
31+
32+
## How build caching works
33+
34+
When enabled, build caching will automatically detect which package manager and framework the project is using from its `package.json` and cache data accordingly for the build.
35+
36+
The following shows which package managers and frameworks are supported for dependency and build output caching respectively.
37+
38+
### Package managers
39+
40+
Workers build cache will cache the global cache directories of the following package managers:
41+
42+
- [yarn](https://yarnpkg.com/)
43+
- [npm](https://www.npmjs.com/)
44+
- [pnpm](https://pnpm.io/)
45+
- [node.js](https://nodejs.org/)
46+
47+
### Frameworks
48+
49+
The following frameworks support build output caching:
50+
51+
| Framework | Directories cached |
52+
| ---------- | --------------------------------------------- |
53+
| Astro | `node_modules/.astro` |
54+
| Docusaurus | `node_modules/.cache`, `.docusaurus`, `build` |
55+
| Eleventy | `.cache` |
56+
| Gatsby | `.cache`, `public` |
57+
| Next.js | `.next/cache` |
58+
| Nuxt | `node_modules/.cache/nuxt` |
59+
60+
:::note
61+
[Static assets](/workers/static-assets/) and [frameworks](/workers/frameworks/) are now supported in Cloudflare Workers.
62+
:::
63+
64+
## Limits
65+
66+
The following limits are imposed for build caching:
67+
68+
- **Retention**: Cache is purged 7 days after its last read date. Unread cache artifacts are purged 7 days after creation.
69+
- **Storage**: Every project is allocated 10 GB. If the project cache exceeds this limit, the project will automatically start deleting artifacts that were read least recently.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
pcx_content_type: concept
3+
title: Build watch paths
4+
description: Reduce compute for your monorepo by specifying paths for Workers Builds to skip
5+
sidebar:
6+
order: 6
7+
---
8+
9+
When you connect a git repository to Workers, by default a change to any file in the repository will trigger a build. You can configure Workers to include or exclude specific paths to specify if Workers should skip a build for a given path. This can be especially helpful if you are using a monorepo project structure and want to limit the amount of builds being kicked off.
10+
11+
## Configure paths
12+
13+
To configure which paths are included and excluded:
14+
15+
1. In **Overview**, select your Workers project.
16+
2. Go to **Settings** > **Build** > **Build watch paths**. Workers will default to setting your project’s includes paths to everything (\[\*]) and excludes paths to nothing (`[]`).
17+
18+
The configuration fields can be filled in two ways:
19+
20+
- **Static filepaths**: Enter the precise name of the file you are looking to include or exclude (for example, `docs/README.md`).
21+
- **Wildcard syntax:** Use wildcards to match multiple path directories. You can specify wildcards at the start or end of your rule.
22+
23+
:::note[Wildcard syntax]
24+
25+
A wildcard (`*`) is a character that is used within rules. It can be placed alone to match anything or placed at the start or end of a rule to allow for better control over branch configuration. A wildcard will match zero or more characters.For example, if you wanted to match all branches that started with `fix/` then you would create the rule `fix/*` to match strings like `fix/1`, `fix/bugs`or `fix/`.
26+
27+
:::
28+
29+
For each path in a push event, build watch paths will be evaluated as follows:
30+
31+
- Paths satisfying excludes conditions are ignored first
32+
- Any remaining paths are checked against includes conditions
33+
- If any matching path is found, a build is triggered. Otherwise the build is skipped
34+
35+
Workers will bypass the path matching for a push event and default to building the project if:
36+
37+
- A push event contains 0 file changes, in case a user pushes a empty push event to trigger a build
38+
- A push event contains 3000+ file changes or 20+ commits
39+
40+
## Examples
41+
42+
### Example 1
43+
44+
If you want to trigger a build from all changes within a set of directories, such as all changes in the folders `project-a/` and `packages/`
45+
46+
- Include paths: `project-a/*, packages/*`
47+
- Exclude paths: \`\`
48+
49+
### Example 2
50+
51+
If you want to trigger a build for any changes, but want to exclude changes to a certain directory, such as all changes in a docs/ directory
52+
53+
- Include paths: `*`
54+
- Exclude paths: `docs/*`
55+
56+
### Example 3
57+
58+
If you want to trigger a build for a specific file or specific filetype, for example all files ending in `.md`.
59+
60+
- Include paths: `*.md`
61+
- Exclude paths: \`\`

src/content/docs/workers/ci-cd/builds/limits-and-pricing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pcx_content_type: concept
33
title: Limits & Pricing
44
description: Limits & pricing for Workers Builds
55
sidebar:
6-
order: 6
6+
order: 8
77
---
88

99
## Limits

src/content/docs/workers/ci-cd/builds/troubleshoot.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pcx_content_type: troubleshooting
33
title: Troubleshooting
44
description: Learn about troubleshooting and known issues in Workers Builds.
55
sidebar:
6-
order: 7
6+
order: 9
77
---
88

99
Workers Builds provides build logs for every build started. You can view build logs by navigating to your **Worker project** > **Deployments** > **View Build History** > **View Build**.

0 commit comments

Comments
 (0)