Skip to content

overlane deploy rollback

Restore an environment's previous release

Updated View as MarkdownOpen in ChatGPTOpen in Claude

Puts the environment back on its previous release (or –to a named earlier one) in one call, and records who did it and why. The restored release was approved and verified at its own deploy, so a rollback is not held for a new approval. If the provider fails, nothing changes and the current release keeps serving. Needs –force without a terminal.

Usage

overlane deploy rollback [env] [--reason TEXT] [--to RELEASE] [--dry-run] [--force]

Arguments

Argument Required Description
env no The environment (required)

Flags

Flag Type Required Default Description
--reason string no Why; kept in the rollback record (required)
--to string no A specific earlier release (default: the previous one)
--dry-run boolean no Print the requests and file changes this command would make, then stop. Needs no credentials.
--force boolean no Confirm a destructive action when there is no terminal to ask on. Without it, exit 2.

Examples

overlane deploy rollback production --reason "checkout is failing" --force
overlane deploy rollback staging --reason "bad copy" --dry-run

Behavior

  • Effect: destructive (deletes or reverts; needs --force without a terminal).
  • Needs credentials: yes. Uses the network: yes.
  • Supports --dry-run: yes. Accepts --force: yes.
  • Machine-readable description: overlane schema deploy rollback.

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"
        },
        "rollback": {
          "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"
            },
            "rollbackId": {
              "type": "string"
            },
            "environment": {
              "type": "string"
            },
            "fromReleaseId": {
              "type": "string"
            },
            "toReleaseId": {
              "type": "string"
            },
            "actor": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "user",
                    "agent"
                  ]
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            "reason": {
              "type": "string",
              "maxLength": 500
            },
            "at": {
              "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)))$"
            }
          },
          "required": [
            "schemaVersion",
            "tenantId",
            "projectId",
            "rollbackId",
            "environment",
            "fromReleaseId",
            "toReleaseId",
            "actor",
            "reason",
            "at"
          ],
          "additionalProperties": false
        },
        "restored": {
          "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
        },
        "replay": {
          "type": "boolean"
        }
      },
      "required": [
        "tenantId",
        "rollback",
        "restored",
        "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.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close

Overlane Agent

Ask about the docs. Answers are quoted from the pages, with links. This panel cannot change anything.

    Questions are answered in your browser from the docs index. Nothing you type here is stored or sent anywhere.