Table: vercel_deployment - Query Vercel Deployments using SQL
A Vercel Deployment is a version of your application that is accessible via a URL. Each deployment is assigned a unique URL that points to a specific version of your application. Vercel Deployments are immutable, meaning once they are created, they cannot be changed or deleted.
Table Usage Guide
The vercel_deployment
table provides insights into deployments within the Vercel platform. As a DevOps engineer, explore deployment-specific details through this table, including deployment status, creation time, and associated metadata. Utilize it to uncover information about deployments, such as those that failed, those that are currently active, and the historical record of deployments.
Examples
List recent deployments
Explore recent project deployments to gain insights into their status, associated URLs, creators, and relevant commit messages and references. This can be particularly useful for tracking development progress and identifying potential issues in a timely manner.
select name as project, state, url, creator ->> 'email' as creator, meta ->> 'githubCommitMessage' as commit_message, meta ->> 'githubCommitRef' as commit_reffrom vercel_deploymentwhere created_at > now() - interval '2 weeks'order by created_at desc;
select name as project, state, url, json_extract(creator, '$.email') as creator, json_extract(meta, '$.githubCommitMessage') as commit_message, json_extract(meta, '$.githubCommitRef') as commit_reffrom vercel_deploymentwhere created_at > datetime('now', '-14 day')order by created_at desc;
List recent deployments that are in ERROR state
This example allows you to identify recent projects that have encountered errors during deployment. This can be useful for quickly pinpointing problematic deployments and addressing issues in a timely manner.
select name as project, state, url, creator ->> 'email' as creator, meta ->> 'githubCommitMessage' as commit_messagefrom vercel_deploymentwhere created_at > now() - interval '2 weeks' and state = 'ERROR'order by created_at desc;
select name as project, state, url, json_extract(creator, '$.email') as creator, json_extract(meta, '$.githubCommitMessage') as commit_messagefrom vercel_deploymentwhere created_at > datetime('now', '-14 day') and state = 'ERROR'order by created_at desc;
Schema for vercel_deployment
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
building_at | timestamp with time zone | Time when deployment started to build. | |
created_at | timestamp with time zone | >, >=, = | Time when the deployment was created. |
creator | jsonb | Creator of the deployment. | |
meta | jsonb | GitHub metadata associated with the deployment. | |
name | text | Name of the deployment. | |
ready | timestamp with time zone | Time when deployment is ready to view. | |
state | text | One of: BUILDING, ERROR, INITIALIZING, QUEUED, READY, CANCELED. | |
url | text | URL of the deployment. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- vercel
You can pass the configuration to the command with the --config
argument:
steampipe_export_vercel --config '<your_config>' vercel_deployment