-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Anni/wcicd new features #17762
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
Merged
Merged
Anni/wcicd new features #17762
Changes from 85 commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
18736b2
Adding docs for Workers CI/CD in Closed Beta
aninibread 29cb3a7
Deleting redundant CI/CD related pages. Deleted content has been move…
aninibread ee5eb0e
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread d08eeb8
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread ba3c060
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread 0f81ccb
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread c7a2d30
Update src/content/docs/workers/ci-cd/index.mdx
aninibread 2c60e9d
Update src/content/docs/workers/ci-cd/index.mdx
aninibread 85c2cbc
Added link reference for Wrangler environments.
aninibread 032e966
Added Build Limits to Overview Page.
aninibread 5978781
added more to troubleshooting page
aninibread 6b5d23f
Update src/content/docs/workers/ci-cd/build-system/troubleshoot.mdx
aninibread c37c2d7
Update src/content/docs/workers/ci-cd/build-system/troubleshoot.mdx
aninibread 6c273b5
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread a42186a
Remove wordy description in Builds index.mdx
aninibread 019ff16
remaning section to builds from build system
aninibread 4938c6b
Referencing Builds instead of Build System
aninibread 1ca9a27
Adding reference for Wrangler Environments
aninibread bd9ca0d
Change reference of Workers build system to Workers Builds
aninibread 3934fa9
Few tweaks
kodster28 cf4dd78
New change in release now includes non-'Main' branch support.
aninibread 3bf7a8e
Improve instructions for monorepo and wrangler env support.
aninibread cb01b51
adding back some tweaks
aninibread 60fb91d
Updating build image page and header
aninibread 9a733c4
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread 95b3193
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread e0a20b3
small tweaks + note in change log
aninibread ab2f1c3
small tweaks
aninibread e1561b8
Update src/content/docs/workers/ci-cd/index.mdx
aninibread 518372a
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread e4bf4f5
Update src/content/docs/workers/ci-cd/builds/troubleshoot.mdx
aninibread ad72ec4
Update src/content/docs/workers/ci-cd/builds/troubleshoot.mdx
aninibread e1c0774
adding suggested changes
aninibread f8fd013
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread 46326c9
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread a154fc6
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread b88b9d4
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread 0028f50
Update src/content/docs/workers/ci-cd/external-cicd.mdx
aninibread 12b1c4a
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread e071fdb
Update src/content/docs/workers/ci-cd/builds/build-image.mdx
aninibread 68e90ab
why cicd changes
aninibread d513628
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread 8b063cc
redirect and link updates
aninibread 1f931e9
add pre-installed packages section
aninibread 93d4e64
Merge branch 'production' into anni/wcicd
aninibread bbd1d45
add images, diagrams, and examples
aninibread 6314b3d
Build setting details and changes
aninibread b8c991e
adding in default version update message
aninibread f352b67
adding troubleshooting view
aninibread 2a9515e
nevi edits to anni's builds PR (#16962)
nevikashah 4b149ff
trigger builds
WalshyDev b599c70
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread a21f4c8
added git integration + individual external ci/cd pages + small tweaks
aninibread 88dbeeb
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread f7623f3
Update src/content/docs/workers/ci-cd/builds/configuration.mdx
aninibread 9d34011
Link fixes
aninibread 2479f75
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread c69950f
Added a which ci/cd should i choose section. Added fix to git integra…
aninibread c2837fd
Update src/content/docs/workers/ci-cd/builds/build-image.mdx
aninibread 03f5390
versions updates and added git troubleshooting
aninibread 1bb08c3
small edit
aninibread 2501833
edit on getting started
aninibread a8d6af8
removing enterprise from pricing plan
aninibread 7a848cd
fix index
aninibread b2c7064
added change log for workers builds
aninibread baf4640
spelling mistake
aninibread b0d345e
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread dd2ca78
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread c61ae40
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread a6ee00c
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread ad6c3ba
Update src/content/docs/workers/ci-cd/builds/advanced-setups.mdx
aninibread e5a0295
Update src/content/docs/workers/ci-cd/index.mdx
aninibread 94bff1b
Update src/content/docs/workers/ci-cd/index.mdx
aninibread 9a1a188
Update src/content/docs/workers/ci-cd/index.mdx
aninibread e9ce294
Update src/content/docs/workers/configuration/versions-and-deployment…
aninibread 21a3617
Update src/content/docs/workers/wrangler/deprecations.mdx
aninibread 47945ac
existing Worker distinction
aninibread 10f94fb
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread 779a780
small fix
aninibread 9db5306
reverting github actions workflow change
aninibread 9523cad
change page setup
aninibread ccfc092
Merge branch 'production' of https://github.com/cloudflare/cloudflare…
aninibread dc3ed88
Added build caching and build watch paths for Workers and updated the…
aninibread 999f892
fix merge conflict marker
aninibread 5b0090d
Revert "change page setup"
aninibread 2d938fb
fix github actions merge conflict
aninibread File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 17 additions & 17 deletions
34
src/content/docs/pages/configuration/build-watch-paths.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,58 @@ | ||
| --- | ||
| pcx_content_type: concept | ||
| title: Build watch paths | ||
|
|
||
| --- | ||
|
|
||
| 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. | ||
|
|
||
| ## Configure paths | ||
|
|
||
| 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 (`[]`). | ||
| To configure which paths are included and excluded: | ||
|
|
||
| 1. In **Overview**, select your Pages project. | ||
| 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 (`[]`). | ||
|
|
||
| The configuration fields can be filled in two ways: | ||
|
|
||
| * **Static filepaths**: Enter the precise name of the file you are looking to include or exclude (for example, `docs/README.md`). | ||
| * **Wildcard syntax:** Use wildcards to match multiple path directories. You can specify wildcards at the start or end of your rule. | ||
| - **Static filepaths**: Enter the precise name of the file you are looking to include or exclude (for example, `docs/README.md`). | ||
| - **Wildcard syntax:** Use wildcards to match multiple path directories. You can specify wildcards at the start or end of your rule. | ||
|
|
||
| :::note[Wildcard syntax] | ||
|
|
||
|
|
||
| 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/`. | ||
|
|
||
|
|
||
| ::: | ||
|
|
||
| For each path in a push event, build watch paths will be evaluated as follows: | ||
|
|
||
| * Paths satisfying excludes conditions are ignored first | ||
| * Any remaining paths are checked against includes conditions | ||
| * If any matching path is found, a build is triggered. Otherwise the build is skipped | ||
| - Paths satisfying excludes conditions are ignored first | ||
| - Any remaining paths are checked against includes conditions | ||
| - If any matching path is found, a build is triggered. Otherwise the build is skipped | ||
|
|
||
| Pages will bypass the path matching for a push event and default to building the project if: | ||
|
|
||
| * A push event contains 0 file changes, in case a user pushes a empty push event to trigger a build | ||
| * A push event contains 3000+ file changes or 20+ commits | ||
| - A push event contains 0 file changes, in case a user pushes a empty push event to trigger a build | ||
| - A push event contains 3000+ file changes or 20+ commits | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Example 1 | ||
|
|
||
| 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/` | ||
|
|
||
| * Include paths: `project-a/*, packages/*` | ||
| * Exclude paths: \`\` | ||
| - Include paths: `project-a/*, packages/*` | ||
| - Exclude paths: \`\` | ||
|
|
||
| ### Example 2 | ||
|
|
||
| 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 | ||
|
|
||
| * Include paths: `*` | ||
| * Exclude paths: `docs/*` | ||
| - Include paths: `*` | ||
| - Exclude paths: `docs/*` | ||
|
|
||
| ### Example 3 | ||
|
|
||
| If you want to trigger a build for a specific file or specific filetype, for example all files ending in `.md`. | ||
|
|
||
| * Include paths: `*.md` | ||
| * Exclude paths: \`\` | ||
| - Include paths: `*.md` | ||
| - Exclude paths: \`\` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| pcx_content_type: concept | ||
| title: Build caching | ||
| description: Improve build times by caching build outputs and dependencies | ||
| sidebar: | ||
| order: 5 | ||
| --- | ||
|
|
||
| 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. | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Enable build caching | ||
|
|
||
| To enable build caching in the Cloudflare dashboard: | ||
|
|
||
| 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account. | ||
| 2. In Account Home, select **Workers & Pages**. | ||
| 3. In **Overview**, select your Workers project. | ||
| 4. Go to **Settings** > **Build** > **Build cache** and select **Enable**. | ||
|
|
||
| ### Clear cache | ||
|
|
||
| The build cache can be cleared for a project when needed, such as when debugging build issues. To clear the build cache: | ||
|
|
||
| 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account. | ||
| 2. In Account Home, select **Workers & Pages**. | ||
| 3. In **Overview**, select your Workers project. | ||
| 4. Go to **Settings** > **Build** > **Build cache**. | ||
| 5. Select **Clear Cache** to clear the build cache. | ||
|
|
||
| ## How build caching works | ||
|
|
||
| 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. | ||
|
|
||
| The following shows which package managers and frameworks are supported for dependency and build output caching respectively. | ||
|
|
||
| ### Package managers | ||
|
|
||
| Workers build cache will cache the global cache directories of the following package managers: | ||
|
|
||
| - [yarn](https://yarnpkg.com/) | ||
| - [npm](https://www.npmjs.com/) | ||
| - [pnpm](https://pnpm.io/) | ||
| - [node.js](https://nodejs.org/) | ||
|
|
||
| ### Frameworks | ||
|
|
||
| The following frameworks support build output caching: | ||
|
|
||
| | Framework | Directories cached | | ||
| | ---------- | --------------------------------------------- | | ||
| | Astro | `node_modules/.astro` | | ||
| | Docusaurus | `node_modules/.cache`, `.docusaurus`, `build` | | ||
| | Eleventy | `.cache` | | ||
| | Gatsby | `.cache`, `public` | | ||
| | Next.js | `.next/cache` | | ||
| | Nuxt | `node_modules/.cache/nuxt` | | ||
|
|
||
| :::note | ||
| [Static assets](/workers/static-assets/) and [frameworks](/workers/frameworks/) are now supported in Cloudflare Workers. | ||
| ::: | ||
|
|
||
| ## Limits | ||
|
|
||
| The following limits are imposed for build caching: | ||
|
|
||
| - **Retention**: Cache is purged 7 days after its last read date. Unread cache artifacts are purged 7 days after creation. | ||
| - **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. |
61 changes: 61 additions & 0 deletions
61
src/content/docs/workers/ci-cd/builds/build-watch-paths.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| pcx_content_type: concept | ||
| title: Build watch paths | ||
| description: Reduce compute for your monorepo by specifying paths for Workers Builds to skip | ||
| sidebar: | ||
| order: 6 | ||
| --- | ||
|
|
||
| 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. | ||
|
|
||
| ## Configure paths | ||
|
|
||
| To configure which paths are included and excluded: | ||
|
|
||
| 1. In **Overview**, select your Workers project. | ||
| 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 (`[]`). | ||
aninibread marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The configuration fields can be filled in two ways: | ||
|
|
||
| - **Static filepaths**: Enter the precise name of the file you are looking to include or exclude (for example, `docs/README.md`). | ||
| - **Wildcard syntax:** Use wildcards to match multiple path directories. You can specify wildcards at the start or end of your rule. | ||
|
|
||
| :::note[Wildcard syntax] | ||
|
|
||
| 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/`. | ||
|
|
||
| ::: | ||
|
|
||
| For each path in a push event, build watch paths will be evaluated as follows: | ||
|
|
||
| - Paths satisfying excludes conditions are ignored first | ||
| - Any remaining paths are checked against includes conditions | ||
| - If any matching path is found, a build is triggered. Otherwise the build is skipped | ||
|
|
||
| Workers will bypass the path matching for a push event and default to building the project if: | ||
|
|
||
| - A push event contains 0 file changes, in case a user pushes a empty push event to trigger a build | ||
| - A push event contains 3000+ file changes or 20+ commits | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Example 1 | ||
|
|
||
| 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/` | ||
|
|
||
| - Include paths: `project-a/*, packages/*` | ||
| - Exclude paths: \`\` | ||
|
|
||
| ### Example 2 | ||
|
|
||
| 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 | ||
|
|
||
| - Include paths: `*` | ||
| - Exclude paths: `docs/*` | ||
|
|
||
| ### Example 3 | ||
|
|
||
| If you want to trigger a build for a specific file or specific filetype, for example all files ending in `.md`. | ||
|
|
||
| - Include paths: `*.md` | ||
| - Exclude paths: \`\` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.