Skip to content

Commit ac5b771

Browse files
aninibreadhyperlint-ai[bot]irvinebroquekodster28ToriLindsay
authored
Anni/wcicd (#16642)
* 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 --------- 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 b8f4797 commit ac5b771

File tree

20 files changed

+459
-70
lines changed

20 files changed

+459
-70
lines changed

public/_redirects

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@
14341434
/workers/runtime-apis/webgpu/ /durable-objects/api/webgpu/ 301
14351435
/workers/runtime-apis/websockets/use-websockets/ /workers/examples/websockets/ 301
14361436
/workers/runtime-apis/websockets/websockets/ /workers/runtime-apis/websockets/ 301
1437-
/workers/learning/continuous-integration/ /workers/configuration/continuous-integration/ 301
1437+
/workers/learning/continuous-integration/ /workers/ci-cd/ 301
14381438
/workers/learning/security-model/ /workers/reference/security-model/ 301
14391439
/workers/runtime-apis/R2/ /workers/runtime-apis/bindings/R2/ 301
14401440
/workers/runtime-apis/durable-objects/ /durable-objects/api/ 301
@@ -1444,6 +1444,8 @@
14441444
/workers/runtime-apis/service-bindings/ /workers/runtime-apis/bindings/service-bindings/ 301
14451445
/workers/observability/local-development-and-testing/ /workers/testing/local-development/ 301
14461446
/workers/configuration/deployments/ /workers/configuration/versions-and-deployments/ 301
1447+
/workers/configuration/continuous-integration/ /workers/ci-cd/ 301
1448+
/workers/wrangler/ci-cd/ /workers/ci-cd/external-cicd/ 301
14471449
/workers/tutorials/hello-world-rust/ /workers/tutorials/ 301
14481450
/workers/tutorials/introduction-to-cloudflare-workers/ https://www.youtube.com/watch?v=H7Qe96fqg1M 301
14491451
/workers/configuration/bindings/about-service-bindings/ /workers/runtime-apis/bindings/service-bindings/ 301
19 KB
Loading

src/content/changelogs/workers.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ productLink: "/workers/"
55
productArea: Developer platform
66
productAreaLink: /workers/platform/changelog/platform/
77
entries:
8+
- publish_date: "2024-09-26"
9+
description: |-
10+
- You can now connect your GitHub or GitLab repository to an existing Worker to automatically build and deploy your changes when you make a git push with [Workers Builds](/workers/ci-cd/builds/).
811
- publish_date: "2024-09-19"
912
description: |-
1013
- Revamped Workers and Pages UI settings to simplify the creation and management of project configurations. For bugs and general feedback, please submit this [form](https://forms.gle/XXqhRGbZmuzninuN9).

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ When your build starts, if not already [cached](/pages/configuration/build-cachi
5151

5252
To override default versions of languages and tools in the build system, you can either set the desired version through environment variables or by adding files to your project.
5353

54-
To set the version using **environment variables**, you can:
54+
To set the version using environment variables, you can:
5555

5656
1. Find the environment variable name for the language or tool in [this table](/pages/configuration/build-image/#supported-languages-and-tools).
5757
2. Add the environment variable on the dashboard by going to **Settings** > **Environmnet variables** in your Pages project, or [add the environment variable via Wrangler](/workers/configuration/environment-variables/#add-environment-variables-via-wrangler).
5858

59-
Or, to set the version by **adding a file** to your project, you can:
59+
Or, to set the version by adding a file to your project, you can:
6060

61-
1. Find the environment variable name for the language or tool in [this table](/pages/configuration/build-image/#supported-languages-and-tools).
61+
1. Find the file name for the language or tool in [this table](/pages/configuration/build-image/#supported-languages-and-tools).
6262
2. Add the specified file name to the root directory of your project, and add the desired version number as the contents of the file.
6363

6464
For example, if you were previously relying on the default version of Node.js in the v1 build system, to migrate to v2, you must specify that you need Node.js `12.18.0` by setting a `NODE_VERSION = 12.18.0` environment variable or by adding a `.node-version` or `.nvmrc` file to your project with `12.18.0` added as the contents to the file.

src/content/docs/pages/configuration/git-integration.mdx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
22
pcx_content_type: concept
33
title: Git integration
4-
54
---
65

76
Cloudflare supports connecting Cloudflare Pages to your GitHub and GitLab repositories to look for new changes to your project. Pages does not currently support self-hosted instances of GitHub or GitLab.
87

98
## Custom branches
109

11-
Suppose you have a custom Git workflow that uses specific branches to represent your project's production build. In that case, you can specify a custom branch when creating (or managing an existing) project in the Pages dashboard by going to **Settings** > **Builds & deployments** and clicking the **Configure Production deployments** button. You can change the production branch to any other branch in the dropdown menu under **production branch**.
10+
Suppose you have a custom Git workflow that uses specific branches to represent your project's production build. In that case, you can specify a custom branch when creating (or managing an existing) project in the Pages dashboard by going to **Settings** > **Builds & deployments** > **Configure Production deployments**. To change the production branch, click the **production branch** dropdown menu and choose any other branch.
1211

1312
You can also use [preview deployments](/pages/configuration/preview-deployments/) to preview how the new version of your project looks before merging into `production`. In addition, Pages allows you to configure which of your preview branches are built and deployed by using [branch build controls](/pages/configuration/branch-build-controls/).
1413

1514
To configure this in your Pages project go to **Settings** > **Builds & deployments** > **Configure preview deployment** and select **Custom branches**. Here you can specify branches you wish to include and exclude from automatic deployments in the provided configuration fields. To learn more refer to the [branch build controls](/pages/configuration/branch-build-controls/) documentation.
1615

16+
## Skipping a specific build via a commit message
17+
18+
Without any configuration required, you can choose to skip a deployment on an adhoc basis. By adding the `[CI Skip]`, `[CI-Skip]`, `[Skip CI]`, `[Skip-CI]`, or `[CF-Pages-Skip]` flag as a prefix in your commit message, and Pages will omit that deployment. The prefixes are not case sensitive.
19+
1720
## Organizational access
1821

1922
You can deploy projects to Cloudflare Pages from your open-source team, company, or side project on both GitHub and GitLab.
@@ -24,27 +27,27 @@ When authorizing Cloudflare Pages to access a GitHub account, you can specify ac
2427

2528
:::caution[GitHub security consideration]
2629

27-
2830
A GitHub account should only point to one Cloudflare account, however, this is not enforced. If you are setting up Cloudflare with GitHub for your organization, Cloudflare recommends that you limit the scope of the application to only the repositories you intend to build with Pages at the time that you set up your project. You can modify these permissions as you build more applications.
2931

30-
3132
:::
3233

3334
### GitLab
3435

3536
By authorizing Cloudflare Pages to access your GitLab account, you will automatically allow access to organizations, groups, and namespaces your GitLab account can access for use by Cloudflare Pages. Managing access to these organizations and groups is handled by GitLab.
3637

37-
## Removing access to your GitHub account
38+
## Removing access
3839

39-
You can remove Cloudflare Pages' access to your GitHub account by viewing the [**Applications** page](https://github.com/settings/installations) on GitHub. Note that removing access to GitHub will also disable new builds, though the last build of your site will continue to be hosted via Cloudflare Pages.
40+
### GitHub
4041

41-
## Removing access to your GitLab account
42+
You can remove Cloudflare Pages' access to your GitHub account by viewing the [**Applications** page](https://github.com/settings/installations) on GitHub. The GitHub App is named Cloudflare Workers and Pages, and it is shared between Workers and Pages projects.
4243

43-
You can remove Cloudflare Pages' access to your GitLab account by navigating to **User Settings** > **Applications** > **Authorized Applications**. Find the applications called Cloudflare Pages and select the **Revoke** button to revoke access.
44+
Note that removing access to GitHub will disable new builds for Workers and Pages, though the last build of your site will continue to be hosted via Cloudflare Pages.
4445

45-
## Skipping a specific build via a commit message
46+
### GitLab
4647

47-
Without any configuration required, you can choose to skip a deployment on an adhoc basis. By adding the `[CI Skip]`, `[CI-Skip]`, `[Skip CI]`, `[Skip-CI]` or `[CF-Pages-Skip]` flag as a prefix in your commit message, and Pages will omit that deployment. The prefixes are case insensitive.
48+
You can remove Cloudflare Pages' access to your GitLab account by navigating to **User Settings** > **Applications** > **Authorized Applications**. Find the applications called Cloudflare Pages and select the **Revoke** button to revoke access.
49+
50+
Note that the GitLab application Cloudflare Pages is shared between Workers and Pages projects, and removing access to GitLab will disable new builds for Workers and Pages, though the last build of your site will continue to be hosted via Cloudflare Pages.
4851

4952
## Reinstall a Git installation
5053

@@ -55,7 +58,7 @@ When encountering Git integration related issues, one potential troubleshooting
5558
1. Go to the installation settings page on GitHub:
5659
1. `https://github.com/settings/installations` for individual accounts.
5760
2. `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts.
58-
2. If the Cloudflare Pages installation is there, click **Configure**, and click **Uninstall "Cloudflare Pages"** (if there is no "Cloudflare Pages" installation, the user doesn't need to do anything)
61+
2. If the Cloudflare Workers and Pages installation is there, click **Configure**, and click **Uninstall "Cloudflare Workers and Pages"**. If there is no "Cloudflare Workers and Pages" installation there, then you don't need to do anything.
5962
3. Go back to the **Workers & Pages** overview page at `https://dash.cloudflare.com/[YOUR_ACCOUNT_ID]/workers-and-pages`. Click **Create application** > **Pages** > **Connect to Git**
6063
4. Click the **+ Add account** button, click the GitHub account you want to add, and then click **Install & Authorize**.
6164
5. You should be redirected to the create project page with your GitHub account or organization in the account list.
@@ -67,7 +70,7 @@ When encountering Git integration related issues, one potential troubleshooting
6770
2. Click the "Revoke" button on your Cloudflare Pages installation if it exists.
6871
3. Go back to the **Workers & Pages** overview page at `https://dash.cloudflare.com/[YOUR_ACCOUNT_ID]/workers-and-pages`. Click **Create application** > **Pages** > **Connect to Git**
6972
4. Select the **GitLab** tab at the top, click the **+ Add account** button, click the GitLab account you want to add, and then click **Authorize** on the modal titled "Authorize Cloudflare Pages to use your account?".
70-
5. You should be redirected to the create project page with your GitHub account or organization in the account list.
73+
5. You will be redirected to the create project page with your GitLab account or organization in the account list.
7174
6. Attempt to make a new deployment with your project which was previously broken.
7275

7376
## Troubleshooting
@@ -98,8 +101,8 @@ To resolve this issue, follow the steps provided above in the [Reinstalling a Gi
98101

99102
Go to your GitHub installation settings:
100103

101-
* `https://github.com/settings/installations` for individual accounts
102-
* `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts
104+
- `https://github.com/settings/installations` for individual accounts
105+
- `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts
103106

104107
Click **Configure** on the Cloudflare Pages application. Scroll down to the bottom of the page and click **Unsuspend** to allow Cloudflare Pages to make future deployments.
105108

@@ -109,10 +112,10 @@ You may have deleted or transferred the repository associated with this Cloudfla
109112

110113
#### `The repository cannot be accessed, this may cause deployments to fail.`
111114

112-
You may have excluded this repository from your installation's repository access settings. Go to your GitHub installation settings:
115+
You may have excluded this repository from your installation's repository access settings. Go to your GitHub installation settings:
113116

114-
* `https://github.com/settings/installations` for individual accounts
115-
* `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts
117+
- `https://github.com/settings/installations` for individual accounts
118+
- `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts
116119

117120
Click **Configure** on the Cloudflare Pages application. Under **Repository access**, ensure that the repository associated with your Cloudflare Pages project is included in the list.
118121

@@ -122,4 +125,4 @@ This is an internal error in the Cloudflare Pages SCM system. You can attempt to
122125

123126
## Related resources
124127

125-
* [Branch build controls](/pages/configuration/branch-build-controls/#production-branch-control) - Control which environments and branches you would like to automatically deploy to.
128+
- [Branch build controls](/pages/configuration/branch-build-controls/#production-branch-control) - Control which environments and branches you would like to automatically deploy to.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
pcx_content_type: reference
3+
title: Advanced Setups
4+
description: Learn how to use Workers Builds with more advanced setups
5+
sidebar:
6+
order: 5
7+
---
8+
9+
## Monorepos
10+
11+
While the Workers Builds beta has limited support for monorepos, it is still possible to set up a monorepo workflow. In the Cloudflare Dashboard, you must connect your monorepo to each of the existing Worker projects. When a new commit is detected in the monorepo, a new build/deploy will trigger for each Worker.
12+
13+
### Example
14+
15+
In the example `ecommerce-monorepo`, a Workers project should be created for `product-service`, `auth-service`, `order-service`, and `notification-service`.
16+
17+
A git connection to `ecommerce-monorepo` should be added in all of the Workers projects. If you are using a monorepo tool (e.g. [Turborepo](https://turbo.build/)), you can configure a different deploy command for each Worker (e.g. `turbo deploy -F product-service`). When a new commit is made to `ecommerce-monorepo`, a build and deploy will be triggered for each of the Workers (i.e. `product-service`, `auth-service`, `order-service`, `notification-service`) and respect the configured commands for that Worker.
18+
19+
```
20+
ecommerce-monorepo/
21+
22+
├── workers/
23+
│ ├── product-service/
24+
│ │ ├── src/
25+
│ │ └── wrangler.toml
26+
│ ├── auth-service/
27+
│ │ ├── src/
28+
│ │ └── wrangler.toml
29+
│ ├── order-service/
30+
│ │ ├── src/
31+
│ │ └── wrangler.toml
32+
│ └── notification-service/
33+
│ ├── src/
34+
│ └── wrangler.toml
35+
├── shared/
36+
│ └── utils/
37+
└── README.md
38+
```
39+
40+
## Wrangler environments
41+
42+
If you are using [Wrangler Environments](/workers/wrangler/environments/), you can choose to continue using with Workers Builds with a bit of set up:
43+
44+
1. [Deploy via Wrangler](/workers/wrangler/commands/#deploy) to create the Workers for your environments in the Dashboard, if you don't already have them.
45+
2. Find the Workers for your environments. They are typically named `[name of Worker] - [environment name]`.
46+
3. Connect your repository to each of the Workers for your environment.
47+
4. In each of the Workers, edit your Wrangler deploy command to include the flag `--env: <environment name>` in the build configurations.
48+
49+
When a new commit is detected in the repository, a new build/deploy will trigger for each associated Worker.
50+
51+
### Example
52+
53+
Imagine you have a Worker named `my-worker`, and you want to set up two environments `staging` and `production` set in the `wrangler.toml`. If you haven't already, you can deploy `my-worker` for each environment using the commands `wrangler deploy --env staging` and `wrangler deploy --env production`.
54+
55+
In your Cloudflare Dashboard, you should find two Workers `my-worker-staging` and `my-worker-production`. A git connection to a `my-worker` git repository should be added to both of the environment Workers. In the build configurations of each environment Worker, edit the deploy commands to be `npx wrangler deploy --env staging` and `npx wrangler deploy --env production` respectively.
56+
57+
```mermaid
58+
graph TD
59+
A[Git Repo for my-worker] --> |Connect| B[my-worker-staging]
60+
A --> |Connect| C[my-worker-production]
61+
62+
subgraph Cloudflare Dashboard
63+
B
64+
C
65+
end
66+
```
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
pcx_content_type: reference
3+
title: Build Image
4+
description: Understand the build image used in Workers Builds.
5+
sidebar:
6+
order: 4
7+
---
8+
9+
Workers Builds uses a build image with support for a variety of languages and tools such as Node.js, Python, PHP, Ruby, and Go.
10+
11+
## Supported Languages and Tools
12+
13+
In the following table, review the preinstalled versions for languages and tools included in the Cloudflare Workers' build image, and the environment variables and/or files available for [overriding the preinstalled version](/workers/ci-cd/builds/build-image/#overriding-default-versions):
14+
15+
| Tool | Default version | Environment variable | File |
16+
| ----------- | ---------------- | -------------------- | ---------------------------- |
17+
| **Go** | 1.23.0 | `GO_VERSION` | |
18+
| **Node.js** | 22 | `NODE_VERSION` | .nvmrc, .node-version |
19+
| **Python** | 3.12.5 | `PYTHON_VERSION` | .python-version, runtime.txt |
20+
| **Ruby** | 3.3.5 | `RUBY_VERSION` | .ruby-version |
21+
| **Bun** | 1.1.28 | `BUN_VERSION` | |
22+
| **Hugo** | extended_0.134.3 | `HUGO_VERSION` | |
23+
24+
The default versions will be updated regularly to the latest minor version. No major version updates will be made without notice. If you need a specific minor version, please specify it by overriding the default version.
25+
26+
### Overriding Default Versions
27+
28+
If you need to override a [specific version](/workers/ci-cd/builds/build-image/#overriding-default-versions) of a language or tool within the image, you can specify it as a [build environment variable](/workers/ci-cd/builds/configuration/#build-settings), or set the relevant file in your source code as shown above.
29+
30+
To set the version using a build environment variables, you can:
31+
32+
1. Find the environment variable name for the language or tool and desired version (e.g. `NODE_VERSION = 22`)
33+
2. Add and save the environment variable on the dashboard by going to **Settings** > **Build** > **Build Variables and Secrets** in your Workers project
34+
35+
Or, to set the version by adding a file to your project, you can:
36+
37+
1. Find the filename for the language or tool (e.g. `.nvmrc`)
38+
2. Add the specified file name to the root directory and set the desired version number as the file's content. For example, if the version number is 22, the file should contain '22'.
39+
40+
## Pre-installed Packages
41+
42+
In the following table, review the pre-installed packages in the build image. The packages are installed with `apt`, a package manager for Linux distributions.
43+
44+
| | | |
45+
| ----------------- | ----------------- | ----------------- |
46+
| `curl` | `libbz2-dev` | `libreadline-dev` |
47+
| `git` | `libc++1` | `libssl-dev` |
48+
| `git-lfs` | `libdb-dev` | `libvips-dev` |
49+
| `unzip` | `libgdbm-dev` | `libyaml-dev` |
50+
| `autoconf` | `libgdbm6` | `tzdata` |
51+
| `build-essential` | `libgbm1` | `wget` |
52+
| `bzip2` | `libgmp-dev` | `zlib1g-dev` |
53+
| `gnupg` | `liblzma-dev` | `zstd` |
54+
| `libffi-dev` | `libncurses5-dev` | |
55+
56+
## Build Environment
57+
58+
Workers Builds are run in the following environment:
59+
60+
| | |
61+
| --------------------- | ------------ |
62+
| **Build Environment** | Ubuntu 24.04 |
63+
| **Architecture** | x86_64 |

0 commit comments

Comments
 (0)