Skip to content

Document new predefined env vars in EA #2401

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 18 additions & 2 deletions deploy/early-access/reference/builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
23 changes: 19 additions & 4 deletions deploy/early-access/reference/env-vars-and-contexts.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,26 @@ const myEnvVar = Deno.env.get("MY_ENV_VAR");
Deno Deploy<sup>EA</sup> 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.

Expand Down