CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 27 of 65

corestack_deployments_rehearse

Rehearse a pipeline.

Scope execRuns as a taskNo secrets returned
On this page

When to use it

Rehearse a deployment pipeline on a non-production environment of the site before deploying it: the build, the upload into a scratch release, the shared files, the platform step and the database stage run against that environment's own services, and nothing is switched. binding_id is this environment's binding, or another environment's of the same site (its stages run here, with this environment's repository, variables, registry secrets and services). proposal rehearses unsaved changes — units by name (build, database, post_deploy, settings), each as corestack_deployments_pipeline_stage_update or corestack_deployments_pipeline_settings_update takes it — checked like a save and never saved. Lines that reach third parties (curl, wget, scp) are skipped and listed. Follow the task, or read the result with corestack_deployments_rehearsal_get; a failure names the step and the reason.

Check first with corestack_deployments_shared_files_check (for: rehearsal, on the environment you rehearse on) and tell the person what it found: a rehearsal stops at linking shared files when the settings file its platform needs is in none of the places it looks, unless the repository includes it, which no check can see before the build; the check names each missing file and where to create it over SFTP or SSH. It only advises: a rehearsal is never refused for its answer, so start when the person says so, whatever it found.

The same action in the public REST API, with the same checks, refusals and scope: POST /api/corestack/sites/{site}/deployments/rehearsals (202 with the rehearsal).

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_deployments_rehearse with site_id 4212, binding_id 1841, proposal {"database":{"lines":["wp option get siteurl"]}}. (Rehearse a pipeline.) Tell me what it returned.

Inputs

binding_idintegerRequired

This environment's binding, or another environment's of the same site (its stages run here). At least 1.

proposalobject

Unsaved units by name (build, database, post_deploy, settings), each as the stage or settings update takes it; checked, never saved.

refstring

A branch or a commit SHA; the repository's branch head when left out. Up to 255 characters.

site_idintegerRequired

The non-production environment to rehearse on. At least 1.

Example call

tools/call
{
  "name": "corestack_deployments_rehearse",
  "arguments": {
    "site_id": 4212,
    "binding_id": 1841,
    "proposal": {
      "database": {
        "lines": ["wp option get siteurl"]
      }
    }
  }
}

If it is refused

ReasonWhat to do
forbiddenThe person's role lacks the Edit Environment Deployment Pipeline permission (a rehearsal runs the pipeline's lines). The message names it and says an owner of the company can grant it in Roles; details.permission is editEnvironmentDeploymentPipeline. Nothing is changed.
switched_offRehearsals are paused by Corefinity (the exec switch); try again later.
rehearsal_productionA production environment is never rehearsed on; rehearse on a staging environment of the site.
busyA rehearsal, deployment or other change of this environment is running; wait for it to finish, then call again.
pipeline_untranslatedThe pipeline carried over from CoreStack Enterprise is not translated yet; contact support.
pipeline_review_pendingPipeline lines carried over are waiting for review; accept them (corestack_deployments_carryover_accept) first.
pipeline_switched_offThe deployment pipeline this binding needs is switched off; the person should contact Corefinity.
pipeline_classicThe binding is not in build, database and post-deploy stages yet; it cannot be rehearsed.
pipeline_lockedCorefinity has locked this pipeline; the proposal cannot be checked against it.
tunnels_switched_offThe build needs tunnels, which are switched off right now; try again later.
invalid_argumentsWith detail_reason no_repository (message: "Connect a repository first"): the site has no repository connected, so there is nothing to rehearse; connect one with corestack_deployments_repository_set first. Nothing is created. The reason is the one this refusal has always answered; detail_reason names it.
not_availableThis environment has no binding the other environment's pipeline can run on.
line_credentialsA proposed line holds a credential; move it into a secret variable (corestack_deployments_variable_set).
line_own_shellA proposed line is only cd <dir> and a later line follows it; each line runs in its own shell, so join them on one line with &&.
line_too_longA proposed line is too long; shorten it.
too_many_linesA proposed stage has too many lines.
managed_elsewhereAnother control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT