Skip to content
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

Anni/wcicd #16642

Merged
merged 80 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
18736b2
Adding docs for Workers CI/CD in Closed Beta
aninibread Sep 5, 2024
29cb3a7
Deleting redundant CI/CD related pages. Deleted content has been move…
aninibread Sep 5, 2024
ee5eb0e
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread Sep 5, 2024
d08eeb8
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread Sep 5, 2024
ba3c060
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread Sep 5, 2024
0f81ccb
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread Sep 5, 2024
c7a2d30
Update src/content/docs/workers/ci-cd/index.mdx
aninibread Sep 5, 2024
2c60e9d
Update src/content/docs/workers/ci-cd/index.mdx
aninibread Sep 5, 2024
85c2cbc
Added link reference for Wrangler environments.
aninibread Sep 5, 2024
032e966
Added Build Limits to Overview Page.
aninibread Sep 5, 2024
5978781
added more to troubleshooting page
aninibread Sep 5, 2024
6b5d23f
Update src/content/docs/workers/ci-cd/build-system/troubleshoot.mdx
aninibread Sep 5, 2024
c37c2d7
Update src/content/docs/workers/ci-cd/build-system/troubleshoot.mdx
aninibread Sep 5, 2024
6c273b5
Update src/content/docs/workers/ci-cd/build-system/build-configuratio…
aninibread Sep 5, 2024
a42186a
Remove wordy description in Builds index.mdx
aninibread Sep 5, 2024
019ff16
remaning section to builds from build system
aninibread Sep 5, 2024
4938c6b
Referencing Builds instead of Build System
aninibread Sep 5, 2024
1ca9a27
Adding reference for Wrangler Environments
aninibread Sep 5, 2024
bd9ca0d
Change reference of Workers build system to Workers Builds
aninibread Sep 5, 2024
3934fa9
Few tweaks
kodster28 Sep 6, 2024
cf4dd78
New change in release now includes non-'Main' branch support.
aninibread Sep 6, 2024
3bf7a8e
Improve instructions for monorepo and wrangler env support.
aninibread Sep 6, 2024
cb01b51
adding back some tweaks
aninibread Sep 6, 2024
60fb91d
Updating build image page and header
aninibread Sep 18, 2024
9a733c4
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread Sep 18, 2024
95b3193
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread Sep 18, 2024
e0a20b3
small tweaks + note in change log
aninibread Sep 18, 2024
ab2f1c3
small tweaks
aninibread Sep 18, 2024
e1561b8
Update src/content/docs/workers/ci-cd/index.mdx
aninibread Sep 19, 2024
518372a
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread Sep 19, 2024
e4bf4f5
Update src/content/docs/workers/ci-cd/builds/troubleshoot.mdx
aninibread Sep 19, 2024
ad72ec4
Update src/content/docs/workers/ci-cd/builds/troubleshoot.mdx
aninibread Sep 19, 2024
e1c0774
adding suggested changes
aninibread Sep 19, 2024
f8fd013
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread Sep 19, 2024
46326c9
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread Sep 19, 2024
a154fc6
Update src/content/docs/workers/ci-cd/builds/index.mdx
aninibread Sep 19, 2024
b88b9d4
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread Sep 19, 2024
0028f50
Update src/content/docs/workers/ci-cd/external-cicd.mdx
aninibread Sep 19, 2024
12b1c4a
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread Sep 19, 2024
e071fdb
Update src/content/docs/workers/ci-cd/builds/build-image.mdx
aninibread Sep 19, 2024
68e90ab
why cicd changes
aninibread Sep 19, 2024
d513628
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread Sep 19, 2024
8b063cc
redirect and link updates
aninibread Sep 19, 2024
1f931e9
add pre-installed packages section
aninibread Sep 19, 2024
93d4e64
Merge branch 'production' into anni/wcicd
aninibread Sep 19, 2024
bbd1d45
add images, diagrams, and examples
aninibread Sep 19, 2024
6314b3d
Build setting details and changes
aninibread Sep 19, 2024
b8c991e
adding in default version update message
aninibread Sep 19, 2024
f352b67
adding troubleshooting view
aninibread Sep 19, 2024
2a9515e
nevi edits to anni's builds PR (#16962)
nevikashah Sep 20, 2024
4b149ff
trigger builds
WalshyDev Sep 20, 2024
b599c70
Update src/content/docs/workers/ci-cd/builds/build-configuration.mdx
aninibread Sep 23, 2024
a21f4c8
added git integration + individual external ci/cd pages + small tweaks
aninibread Sep 23, 2024
88dbeeb
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread Sep 23, 2024
f7623f3
Update src/content/docs/workers/ci-cd/builds/configuration.mdx
aninibread Sep 23, 2024
9d34011
Link fixes
aninibread Sep 23, 2024
2479f75
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread Sep 23, 2024
c69950f
Added a which ci/cd should i choose section. Added fix to git integra…
aninibread Sep 24, 2024
c2837fd
Update src/content/docs/workers/ci-cd/builds/build-image.mdx
aninibread Sep 24, 2024
03f5390
versions updates and added git troubleshooting
aninibread Sep 24, 2024
1bb08c3
small edit
aninibread Sep 24, 2024
2501833
edit on getting started
aninibread Sep 24, 2024
a8d6af8
removing enterprise from pricing plan
aninibread Sep 24, 2024
7a848cd
fix index
aninibread Sep 24, 2024
b2c7064
added change log for workers builds
aninibread Sep 24, 2024
baf4640
spelling mistake
aninibread Sep 24, 2024
b0d345e
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread Sep 25, 2024
dd2ca78
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread Sep 25, 2024
c61ae40
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread Sep 25, 2024
a6ee00c
Update src/content/docs/pages/configuration/git-integration.mdx
aninibread Sep 25, 2024
ad6c3ba
Update src/content/docs/workers/ci-cd/builds/advanced-setups.mdx
aninibread Sep 25, 2024
e5a0295
Update src/content/docs/workers/ci-cd/index.mdx
aninibread Sep 25, 2024
94bff1b
Update src/content/docs/workers/ci-cd/index.mdx
aninibread Sep 25, 2024
9a1a188
Update src/content/docs/workers/ci-cd/index.mdx
aninibread Sep 25, 2024
e9ce294
Update src/content/docs/workers/configuration/versions-and-deployment…
aninibread Sep 25, 2024
21a3617
Update src/content/docs/workers/wrangler/deprecations.mdx
aninibread Sep 25, 2024
47945ac
existing Worker distinction
aninibread Sep 25, 2024
10f94fb
Merge branch 'anni/wcicd' of https://github.com/cloudflare/cloudflare…
aninibread Sep 25, 2024
779a780
small fix
aninibread Sep 25, 2024
9db5306
reverting github actions workflow change
aninibread Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@
/workers/runtime-apis/webgpu/ /durable-objects/api/webgpu/ 301
/workers/runtime-apis/websockets/use-websockets/ /workers/examples/websockets/ 301
/workers/runtime-apis/websockets/websockets/ /workers/runtime-apis/websockets/ 301
/workers/learning/continuous-integration/ /workers/configuration/continuous-integration/ 301
/workers/learning/continuous-integration/ /workers/ci-cd/ 301
/workers/learning/security-model/ /workers/reference/security-model/ 301
/workers/runtime-apis/R2/ /workers/runtime-apis/bindings/R2/ 301
/workers/runtime-apis/durable-objects/ /durable-objects/api/ 301
Expand All @@ -1436,6 +1436,8 @@
/workers/runtime-apis/service-bindings/ /workers/runtime-apis/bindings/service-bindings/ 301
/workers/observability/local-development-and-testing/ /workers/testing/local-development/ 301
/workers/configuration/deployments/ /workers/configuration/versions-and-deployments/ 301
/workers/configuration/continuous-integration/ /workers/ci-cd/ 301
/workers/wrangler/ci-cd/ /workers/ci-cd/external-cicd/ 301
/workers/tutorials/hello-world-rust/ /workers/tutorials/ 301
/workers/tutorials/introduction-to-cloudflare-workers/ https://www.youtube.com/watch?v=H7Qe96fqg1M 301
/workers/configuration/bindings/about-service-bindings/ /workers/runtime-apis/bindings/service-bindings/ 301
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/content/changelogs/workers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ productLink: "/workers/"
productArea: Developer platform
productAreaLink: /workers/platform/changelog/platform/
entries:
- publish_date: "2024-09-26"
description: |-
- 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/).
- publish_date: "2024-09-19"
description: |-
- 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).
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/pages/configuration/build-image.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ When your build starts, if not already [cached](/pages/configuration/build-cachi

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.

To set the version using **environment variables**, you can:
To set the version using environment variables, you can:

1. Find the environment variable name for the language or tool in [this table](/pages/configuration/build-image/#supported-languages-and-tools).
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).

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

1. Find the environment variable name for the language or tool in [this table](/pages/configuration/build-image/#supported-languages-and-tools).
1. Find the file name for the language or tool in [this table](/pages/configuration/build-image/#supported-languages-and-tools).
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.

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.
Expand Down
39 changes: 21 additions & 18 deletions src/content/docs/pages/configuration/git-integration.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
---
pcx_content_type: concept
title: Git integration

---

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.

## Custom branches

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**.
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.

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/).

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.

## Skipping a specific build via a commit message

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.

## Organizational access

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

:::caution[GitHub security consideration]


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.


:::

### GitLab

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.

## Removing access to your GitHub account
## Removing access

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.
### GitHub

## Removing access to your GitLab account
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.

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.
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.

## Skipping a specific build via a commit message
### GitLab

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.
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.

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.

## Reinstall a Git installation

Expand All @@ -55,7 +58,7 @@ When encountering Git integration related issues, one potential troubleshooting
1. Go to the installation settings page on GitHub:
1. `https://github.com/settings/installations` for individual accounts.
2. `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts.
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)
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.
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**
4. Click the **+ Add account** button, click the GitHub account you want to add, and then click **Install & Authorize**.
5. You should be redirected to the create project page with your GitHub account or organization in the account list.
Expand All @@ -67,7 +70,7 @@ When encountering Git integration related issues, one potential troubleshooting
2. Click the "Revoke" button on your Cloudflare Pages installation if it exists.
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**
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?".
5. You should be redirected to the create project page with your GitHub account or organization in the account list.
5. You will be redirected to the create project page with your GitLab account or organization in the account list.
6. Attempt to make a new deployment with your project which was previously broken.

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

Go to your GitHub installation settings:

* `https://github.com/settings/installations` for individual accounts
* `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts
- `https://github.com/settings/installations` for individual accounts
- `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts

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.

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

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

You may have excluded this repository from your installation's repository access settings. Go to your GitHub installation settings:
You may have excluded this repository from your installation's repository access settings. Go to your GitHub installation settings:

* `https://github.com/settings/installations` for individual accounts
* `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts
- `https://github.com/settings/installations` for individual accounts
- `https://github.com/organizations/<YOUR_ORGANIZATION_NAME>/settings/installations` for organizational accounts

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.

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

## Related resources

* [Branch build controls](/pages/configuration/branch-build-controls/#production-branch-control) - Control which environments and branches you would like to automatically deploy to.
- [Branch build controls](/pages/configuration/branch-build-controls/#production-branch-control) - Control which environments and branches you would like to automatically deploy to.
66 changes: 66 additions & 0 deletions src/content/docs/workers/ci-cd/builds/advanced-setups.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
pcx_content_type: reference
title: Advanced Setups
description: Learn how to use Workers Builds with more advanced setups
sidebar:
order: 5
---

## Monorepos

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.

### Example

In the example `ecommerce-monorepo`, a Workers project should be created for `product-service`, `auth-service`, `order-service`, and `notification-service`.

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.

```
ecommerce-monorepo/
├── workers/
│ ├── product-service/
│ │ ├── src/
│ │ └── wrangler.toml
│ ├── auth-service/
│ │ ├── src/
│ │ └── wrangler.toml
│ ├── order-service/
│ │ ├── src/
│ │ └── wrangler.toml
│ └── notification-service/
│ ├── src/
│ └── wrangler.toml
├── shared/
│ └── utils/
└── README.md
```

## Wrangler environments

If you are using [Wrangler Environments](/workers/wrangler/environments/), you can choose to continue using with Workers Builds with a bit of set up:

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.
2. Find the Workers for your environments. They are typically named `[name of Worker] - [environment name]`.
3. Connect your repository to each of the Workers for your environment.
4. In each of the Workers, edit your Wrangler deploy command to include the flag `--env: <environment name>` in the build configurations.

When a new commit is detected in the repository, a new build/deploy will trigger for each associated Worker.

### Example

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`.

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.

```mermaid
graph TD
A[Git Repo for my-worker] --> |Connect| B[my-worker-staging]
A --> |Connect| C[my-worker-production]

subgraph Cloudflare Dashboard
B
C
end
```
63 changes: 63 additions & 0 deletions src/content/docs/workers/ci-cd/builds/build-image.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
pcx_content_type: reference
title: Build Image
description: Understand the build image used in Workers Builds.
sidebar:
order: 4
---

Workers Builds uses a build image with support for a variety of languages and tools such as Node.js, Python, PHP, Ruby, and Go.

## Supported Languages and Tools

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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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):
The following languages and tools are included in the Cloudflare Workers' build image. You can [override the preinstalled version](/workers/ci-cd/builds/build-image/#overriding-default-versions) by defining an environment variable or configuration file:

^ simpler language, suggest applying to all places where we start with "In the following table"


| Tool | Default version | Environment variable | File |
| ----------- | ---------------- | -------------------- | ---------------------------- |
| **Go** | 1.23.0 | `GO_VERSION` | |
| **Node.js** | 22 | `NODE_VERSION` | .nvmrc, .node-version |
| **Python** | 3.12.5 | `PYTHON_VERSION` | .python-version, runtime.txt |
| **Ruby** | 3.3.5 | `RUBY_VERSION` | .ruby-version |
| **Bun** | 1.1.28 | `BUN_VERSION` | |
| **Hugo** | extended_0.134.3 | `HUGO_VERSION` | |

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dupe


### Overriding Default Versions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Overriding Default Versions
### How to Override Preinstalled Versions

We should be consistent — either call these preinstalled or default, not mix and match


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.

To set the version using a build environment variables, you can:

1. Find the environment variable name for the language or tool and desired version (e.g. `NODE_VERSION = 22`)
2. Add and save the environment variable on the dashboard by going to **Settings** > **Build** > **Build Variables and Secrets** in your Workers project

Or, to set the version by adding a file to your project, you can:

1. Find the filename for the language or tool (e.g. `.nvmrc`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Find the filename for the language or tool (e.g. `.nvmrc`)
1. Find the filename for the language or tool, for example, `.nvmrc`.

Issues:

  • Style Guide - (cloudflare.LatinTerms-warning) Use 'for example' instead of 'e.g.', but consider rewriting the sentence.

Fix Explanation:

The use of 'e.g.' can be less clear to some readers, especially those who may not be familiar with Latin abbreviations. Replacing it with 'for example' improves clarity and aligns with common style guide recommendations. The sentence structure remains clear and informative, so a complete rewrite isn't necessary.

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'.

## Pre-installed Packages

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything important to say here about versions?


| | | |
| ----------------- | ----------------- | ----------------- |
| `curl` | `libbz2-dev` | `libreadline-dev` |
| `git` | `libc++1` | `libssl-dev` |
| `git-lfs` | `libdb-dev` | `libvips-dev` |
| `unzip` | `libgdbm-dev` | `libyaml-dev` |
| `autoconf` | `libgdbm6` | `tzdata` |
| `build-essential` | `libgbm1` | `wget` |
| `bzip2` | `libgmp-dev` | `zlib1g-dev` |
| `gnupg` | `liblzma-dev` | `zstd` |
| `libffi-dev` | `libncurses5-dev` | |

## Build Environment

Workers Builds are run in the following environment:

| | |
| --------------------- | ------------ |
| **Build Environment** | Ubuntu 24.04 |
| **Architecture** | x86_64 |
Loading
Loading