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 51 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: 2 additions & 2 deletions .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request:
branches:
push:
branches-ignore:
- production

concurrency:
Expand Down
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.
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
64 changes: 64 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,64 @@
---
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 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not clear to me when I read this page what is limited, versus Pages' support for monorepos? Is the "limited" statement a comparative statement about this versus Pages, or a general "our monorepos support could maybe be more extensive" statement?


### 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.
aninibread marked this conversation as resolved.
Show resolved Hide resolved

```
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
```
33 changes: 33 additions & 0 deletions src/content/docs/workers/ci-cd/builds/build-configuration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
pcx_content_type: configuration
title: Build Configuration
aninibread marked this conversation as resolved.
Show resolved Hide resolved
description: Understand the different settings associated with your build.
sidebar:
order: 2
---

When connecting your repository, you can configure how to build and deploy your Worker.

## Build Settings

Build settings can be found by navigating to **Settings** > **Build** within your Worker. The following configurations are available:

| Setting | Description |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Git account** | Select the git account you would like to use. After initial connection,, you can continue to use this git account for future projects. |
aninibread marked this conversation as resolved.
Show resolved Hide resolved
| **Git repository** | Choose the git repository you would like to connect your Worker to. |
| **Git branch** | Select the branch you would like Cloudflare to listen to for new commits. This will be defaulted to `main`. |
| **Build command** _(Optional)_ | Set a build command if your project requires a build step. This is necessary, for example, is using a front-end framework (e.g. Astro, Remix). |
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
| **Build command** _(Optional)_ | Set a build command if your project requires a build step. This is necessary, for example, is using a front-end framework (e.g. Astro, Remix). |
| **Build command** _(Optional)_ | Set a build command if your project requires a build step. This is necessary, for example, when using a front-end framework such as Astro or Remix.

Issues:

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

Fix Explanation:

The original sentence uses 'e.g.' which is against the style guide recommendation. Replacing 'e.g.' with 'for example' improves clarity. Additionally, rephrasing the sentence to 'when using a front-end framework such as Astro or Remix' enhances readability and aligns with the style guide's preference for full English phrases. The change is recommended to adhere to the style guide and improve the documentation's clarity.

| **Deploy command** | The deploy command lets you set the **specific** Wrangler command to deploy your Worker. Your deploy command will default to `npx wrangler deploy` but you may customize this command if for example you want to create a [version](/workers/configuration/versions-and-deployments/gradual-deployments/) of your Worker or just run `npm run deploy`. Workers Builds will use the Wrangler version set in your `package json`. |
| **Root directory** _(Optional)_ | Specify the root directory of your repository. The root directory describes where the build command will be run. |
| **API token** _(Optional)_ | By default, Cloudflare will automatically generate an API token for your account when using Workers Builds for the first time. Workers Builds will continue to use this API token for all subsequent projects and builds. You can also generate and use new API tokens if you choose. These API tokens will be created with the following permissions for your account: |
aninibread marked this conversation as resolved.
Show resolved Hide resolved
| **Build variables and secrets** _(Optional)_ | Add environment variables and secrets accessible only to your build. Build variables will not be accessible at runtime. If you would like to configure runtime variables you can do so in **Setting**s > **Variables & Secrets** |

:::note[API Token Permissions]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this just be part of the description in the table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel like it's too long to put in the table

The Workers Builds API token will be created automatically with the following permissions:
aninibread marked this conversation as resolved.
Show resolved Hide resolved
- **Account:** Account Settings (read), Workers Scripts (edit), Workers KV Storage (edit), Workers R2 Storage (edit)
- **Zone:** Workers Routes (edit) for all zones on the account
- **User:** User Details (read), Memberships (read)
:::

Please note, any updates to your build settings will be applied on the next build once saved.
aninibread marked this conversation as resolved.
Show resolved Hide resolved
66 changes: 66 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,66 @@
---
pcx_content_type: reference
title: Build Image
description: Understand the build image used in Workers Builds.
sidebar:
order: 3
---

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.22.0 | `GO_VERSION` | |
aninibread marked this conversation as resolved.
Show resolved Hide resolved
| **Node.js** | 22 | `NODE_VERSION` | .nvmrc, .node-version |
| **Python** | 3.12.5 | `PYTHON_VERSION` | .python-version, runtime.txt |
| **Ruby** | 3.3.4 | `RUBY_VERSION` | .ruby-version |
| **Bun** | 1.1.22 | `BUN_VERSION` | |
| **Hugo** | extended_0.130.0 | `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.

Suggested change
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.
Cloudflare updates the default versions regularly to the latest minor version. We do not make major version updates to preinstalled versions without advance notice. If you need a specific version, you should specify it by overriding the default 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/build-configuration/#build-settings), or set the relevant file in your source code as shown above.
Copy link
Contributor

Choose a reason for hiding this comment

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

We already say this above, and I think this is linking to itself right now?


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

Choose a reason for hiding this comment

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

This is another instance where the reader will (rightly) ask — can I set these in my own codebase? In Terraform? etc.

When something isn't yet supported, a ton of the value that docs can provide can be to just be explicit and clear about it upfront, so that someone doesn't have to chase this down themselves. Turn frustration into simple feature request, etc.


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 add the desired version number as the contents of the file (e.g. 22)
aninibread marked this conversation as resolved.
Show resolved Hide resolved
aninibread marked this conversation as resolved.
Show resolved Hide resolved

## 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 |
25 changes: 25 additions & 0 deletions src/content/docs/workers/ci-cd/builds/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
pcx_content_type: concept
title: Builds
Copy link
Contributor

Choose a reason for hiding this comment

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

Screenshot 2024-09-18 at 2 08 49 PM

This is confusing, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is still confusing. If we are calling the system, "Workers Builds" it is too generic to call this section just "Builds".

We need to be super clear here that the section currently called "Builds" is where to learn more about the built-in system that is native to the platform. I'm open to ideas about how we get there.

Screenshot 2024-09-22 at 2 12 19 PM

Ex — this section is now super clear about this:

Screenshot 2024-09-22 at 2 13 32 PM

How can we carry this through to the nav? I know tricky to get right but worth fighting for.

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
title: Builds
title: Built-in CI/CD

...or something?

description: Use Workers Builds to integrate with Git and automatically build and deploy your Worker when you merge a pull request
sidebar:
badge:
text: Beta
---

Workers Builds allows you to connect an existing Worker to a GitHub or GitLab repository to set up automatic builds and deployments for your development workflow.

## Get Started

To set up your Git integration with Workers:

1. **Select your Worker** in the dashboard and navigate to Settings > Build
2. **Select the Git provider** you'd like to connect to by clicking "Connect". Follow the prompts to install the Cloudflare application on your git account.
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
2. **Select the Git provider** you'd like to connect to by clicking "Connect". Follow the prompts to install the Cloudflare application on your git account.
2. **Select the Git provider** you would like to connect to by clicking **Connect**. Follow the prompts to install the Cloudflare application on your git account.

3. **Configure your build settings** by selecting your desired git repository, branch, and configuring a deploy command and optionally a build command.
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like build settings should link to the configuration page in docs?

https://anni-wcicd.cloudflare-docs-7ou.pages.dev/workers/ci-cd/builds/build-configuration/

4. **Push a commit** to your repository to trigger your first build and deploy.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing in Terraform? Not part of OpenAPI spec? Seems like a thing we should be explicit about somewhere in docs, not necessarily this page



## View Build Details

Once a build is in progress, you can monitor its build logs and view build history by navigating to **"View build history"** on the deployments tab of your Worker. If successful, you can also view the build details for each new [version](https://developers.cloudflare.com/workers/configuration/versions-and-deployments/) created. ## Build Limits
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
Once a build is in progress, you can monitor its build logs and view build history by navigating to **"View build history"** on the deployments tab of your Worker. If successful, you can also view the build details for each new [version](https://developers.cloudflare.com/workers/configuration/versions-and-deployments/) created. ## Build Limits
Once a build is in progress, you can monitor its build logs and view build history by navigating to **"View build history"** on the deployments tab of your Worker. If successful, you can also view the build details for each new [version](/workers/configuration/versions-and-deployments/) created. ## Build Limits

Issues:

  • Style Guide - (cloudflare.LinkChecks-warning) Warning: When referring to another page in our docs, use the full relative link (/1.1.1.1/check/) instead of the full URL (https://developers.cloudflare.com/1.1.1.1/check/) or a local development link (http://localhost:111/1.1.1.1/check/).

Fix Explanation:

The change involves replacing the full URL with a relative link to comply with the style guide. This ensures that the documentation remains consistent and links are less likely to break if the base URL changes. The rest of the sentence is clear and does not require any additional modifications.

aninibread marked this conversation as resolved.
Show resolved Hide resolved

29 changes: 29 additions & 0 deletions src/content/docs/workers/ci-cd/builds/limits-and-pricing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
pcx_content_type: concept
title: Limits & Pricing
description: Limits & pricing for Workers Builds
sidebar:
order: 4
---

## Limits

While in open beta, the following limits are applicable for Workers Builds. Please note, these are subject to change while in beta.

| Metric | Description | Limit |
| --------------------- | ---------------------------------------------------------------------- | --------- |
| **Build Minutes** | The amount of minutes that it takes to build a project. | Unlimited |
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
| **Build Minutes** | The amount of minutes that it takes to build a project. | Unlimited |
| **Build Minutes** | The total amount of time you can use each month running build jobs for your Worker | Unlimited |

(or something)

This isn't about building a specific project, current description ambiguous

Copy link
Contributor

Choose a reason for hiding this comment

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

Would also suggest removing period for consistency

| **Concurrent Builds** | Number of builds that run in parallel across an account. | 1 |
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
| **Concurrent Builds** | Number of builds that run in parallel across an account. | 1 |
| **Concurrent Builds** | Number of builds that run in parallel across one Cloudflare account. | 1 |

specific about "Cloudflare account"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Would also suggest removing period for consistency

| **Build Timeout** | The amount of minutes that a build can be run before it is terminated. | 20 mins |
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
| **Build Timeout** | The amount of minutes that a build can be run before it is terminated. | 20 mins |
| **Build Timeout** | Number of minutes that a build can be run before it is terminated. | 20 mins |

Copy link
Contributor

Choose a reason for hiding this comment

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

Would also suggest removing period for consistency

| **CPU** | Number of CPU cores available to your build | 2 CPUs |
| **Memory** | Amount of memory available to the build. | 8GB |
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
| **Memory** | Amount of memory available to the build. | 8GB |
| **Memory** | Amount of memory available to the build | 8GB |

| **Disk space** | Disk space available to your build | 8GB |

## Future Pricing

During the beta, Workers Builds will be free to try with the limits stated above. In the future, once Workers Builds becomes generally available, you can expect the following updates to the limits and pricing structure.
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
During the beta, Workers Builds will be free to try with the limits stated above. In the future, once Workers Builds becomes generally available, you can expect the following updates to the limits and pricing structure.
While in open beta, Workers Builds are free to use, with the limits stated above. Once out of beta, Workers Builds will be priced based on total build minutes used:


| Metric | Workers Free | Paid | Enterprise |
| --------------------- | ------------- | ---------------------------- | ---------- |
| **Build Minutes** | 3,000 minutes | 6,000 minutes, +$0.005 / min | Custom |
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use this format that keeps each plan as a row:

Screenshot 2024-09-22 at 2 41 48 PM m |

Look at Workers Pricing page for clarity here. Don't need to call out the custom piece or Ent. Just say what the price is.

| **Concurrent Builds** | 1 | 6 | Custom |
16 changes: 16 additions & 0 deletions src/content/docs/workers/ci-cd/builds/troubleshoot.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
pcx_content_type: troubleshooting
title: Troubleshooting
description: Learn about troubleshooting and known issues in Workers Builds.
sidebar:
Copy link
Contributor

Choose a reason for hiding this comment

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

Typically, we recommend the beta tag just on the Overview section (instead of every other page). But up to you on the final decision there.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

order: 6
---

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**. While Workers Builds is in Open Beta, the following issues and limitations may apply:

- **Worker Name:** The Worker name in your Cloudflare dashboard and the Worker name written in the associated `wrangler.toml` must be the same. If they do not match, the deploy will fail, and you must update either the file or dashboard.
- **Updating API Tokens:** If you have updated or deleted an API Token, the changes may not be reflected in the Build Configuration settings on the dashboard. If you are encountering authentication errors after updating your build's API Token, we recommend creating a new API Token for the build.
- **Failed Builds stuck in In-Progress:** If your build has failed but the status still show that the build is "In-progress", you should cancel the build, review your build configuration, then retry the build.


If you discover additional issues or would like to provide feedback, please notify us in the [Discord](https://discord.com/channels/595317990191398933/1052656806058528849).
Loading
Loading