From c3a462cd92270bcf36801f92be36151946d9263f Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Mon, 28 Jul 2025 11:05:20 +0200 Subject: [PATCH] Document new predefined env vars in EA --- deploy/early-access/reference/builds.md | 20 ++++++++++++++-- .../reference/env-vars-and-contexts.md | 23 +++++++++++++++---- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/deploy/early-access/reference/builds.md b/deploy/early-access/reference/builds.md index 0348a3900..257ff4495 100644 --- a/deploy/early-access/reference/builds.md +++ b/deploy/early-access/reference/builds.md @@ -36,8 +36,8 @@ A revision goes through these stages before becoming available: downloading dependencies. 4. **Build**: The build command executes (if specified), creating a build artifact that is uploaded to the runtime infrastructure. -5. **Warm up**: A `GET /` request tests that the application boots correctly and - can handle HTTP requests. +5. **Warm up**: The application is booted to check that no errors occur during + startup. 6. **Route**: The global infrastructure is configured to route requests to the new revision based on its timelines. @@ -117,4 +117,20 @@ Environment variables configured for the "Build" context are available during builds, but variables from "Production" or "Development" contexts are not. [Learn more about environment variables](./env-vars-and-contexts/). +The following environment variables are additionally always available during +builds: + +- `CI`: `true` +- `DENO_DEPLOY`: `true` - Indicates that the code is running in Deno Deploy. +- `DENO_DEPLOY_ORGANIZATION_ID`: The ID of the organization that owns the + application. This is a UUID. +- `DENO_DEPLOY_ORGANIZATION_SLUG`: The slug of the organization that owns the + application. This is the human-readable identifier used in URLs that was set + when creating the organization. +- `DENO_DEPLOY_APPLICATION_ID`: The ID of the application. This is a UUID. +- `DENO_DEPLOY_APPLICATION_SLUG`: The slug of the application. This is the + human-readable identifier used in URLs that was set when creating the + application, or changed later in the application settings. +- `DENO_DEPLOY_BUILD_ID`: The ID of the currently running build. + Builders have 8 GB of storage available during the build process. diff --git a/deploy/early-access/reference/env-vars-and-contexts.md b/deploy/early-access/reference/env-vars-and-contexts.md index 125dd0dcf..2492b1efa 100644 --- a/deploy/early-access/reference/env-vars-and-contexts.md +++ b/deploy/early-access/reference/env-vars-and-contexts.md @@ -100,11 +100,26 @@ const myEnvVar = Deno.env.get("MY_ENV_VAR"); Deno DeployEA provides these predefined environment variables in all contexts: -- `DENO_DEPLOYMENT_ID`: A unique identifier representing the entire - configuration set (application ID, revision ID, context, and environment - variables). Changes if any of these components change. +- `DENO_DEPLOY`: `true` - Indicates that the code is running in Deno Deploy. + +- `DENO_DEPLOY_ORGANIZATION_ID`: The ID of the organization that owns the + application. This is a UUID. + +- `DENO_DEPLOY_ORGANIZATION_SLUG`: The slug of the organization that owns the + application. This is the human-readable identifier used in URLs that was set + when creating the organization. + +- `DENO_DEPLOY_APPLICATION_ID`: The ID of the application. This is a UUID. -- `DENO_REVISION_ID`: The ID of the currently running revision. +- `DENO_DEPLOY_APPLICATION_SLUG`: The slug of the application. This is the + human-readable identifier used in URLs that was set when creating the + application, or changed later in the application settings. + +- `DENO_DEPLOY_BUILD_ID`: The ID of the currently running build. + +- `DENO_DEPLOYMENT_ID`: A unique identifier representing the entire + configuration set (application ID, build ID, context, environment variables, + cloud connections, database). Changes if any of these components change. More predefined variables will be added in the future.