Makes (or updates) the preview environment for a branch from a passed run on that branch and deploys the artifact to its own preview URL. Previews are never promoted to the live URL and need no approval.
Usage
overlane deploy preview --branch BRANCH --target TARGET --commit SHA --run RUN [--artifact NAME] [--dry-run]Flags
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--branch |
string | yes | The branch | |
--target |
string | yes | The target (name or ID) | |
--commit |
string | yes | The commit the run built | |
--run |
string | yes | The CI run ID, on that branch | |
--artifact |
string | no | The artifact, when the run produced several | |
--dry-run |
boolean | no | Print the requests and file changes this command would make, then stop. Needs no credentials. |
Examples
overlane deploy preview --branch feature/login --target site --commit 0123456789abcdef0123456789abcdef01234567 --run run_abc123Behavior
- Effect:
write(changes local or hosted state). - Needs credentials: yes. Uses the network: yes.
- Supports
--dry-run: yes. Accepts--force: no. - Machine-readable description:
overlane schema deploy preview.
Result
With --json (the default when stdout is not a terminal) the command prints this JSON Schema’s shape on stdout.
{
"anyOf": [
{
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
"description": "tenant identifier"
},
"release": {
"anyOf": [
{
"type": "object",
"properties": {
"schemaVersion": {
"type": "string",
"const": "1"
},
"tenantId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
"description": "tenant identifier"
},
"projectId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
"description": "project identifier"
},
"releaseId": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"environment": {
"type": "string"
},
"targetId": {
"type": "string"
},
"commitSha": {
"type": "string",
"pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
},
"artifactDigest": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$"
},
"runId": {
"type": [
"string",
"null"
]
},
"evidenceIds": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string"
}
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"agent"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"pending",
"succeeded",
"failed",
"superseded",
"rolled_back"
]
},
"previousReleaseId": {
"type": [
"string",
"null"
]
},
"live": {
"type": "boolean"
},
"providerDeploymentId": {
"type": [
"string",
"null"
]
},
"url": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"approvalId": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finishedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"schemaVersion",
"tenantId",
"projectId",
"releaseId",
"environment",
"targetId",
"commitSha",
"artifactDigest",
"runId",
"evidenceIds",
"actor",
"status",
"previousReleaseId",
"live",
"providerDeploymentId",
"url",
"error",
"approvalId",
"createdAt",
"finishedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"approval": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"summary": {
"type": "string"
},
"nextCommand": {
"type": "string"
}
},
"required": [
"id",
"summary",
"nextCommand"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"replay": {
"type": "boolean"
}
},
"required": [
"tenantId",
"release",
"approval",
"replay"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"dryRun": {
"type": "boolean",
"const": true
},
"service": {
"type": "string"
},
"requests": {
"type": "array",
"items": {
"type": "object",
"properties": {
"method": {
"type": "string"
},
"path": {
"type": "string"
},
"body": {},
"note": {
"type": "string"
}
},
"required": [
"method",
"path"
],
"additionalProperties": false
}
},
"commands": {
"type": "array",
"items": {
"type": "string"
}
},
"writes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"action": {
"type": "string",
"enum": [
"write",
"append",
"delete"
]
},
"description": {
"type": "string"
}
},
"required": [
"path",
"action",
"description"
],
"additionalProperties": false
}
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"dryRun",
"requests",
"commands",
"writes",
"notes"
],
"additionalProperties": false
}
]
}See exit codes for the status the process returns.