corestack_ deployments_ rehearse
Rehearse a pipeline.
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_ or corestack_ 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_ (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 / (202 with the rehearsal).
Ask for it
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
This environment's binding, or another environment's of the same site (its stages run here). At least 1.
Unsaved units by name (build, database, post_deploy, settings), each as the stage or settings update takes it; checked, never saved.
A branch or a commit SHA; the repository's branch head when left out. Up to 255 characters.
The non-production environment to rehearse on. At least 1.
Example call
{
"name": "corestack_deployments_rehearse",
"arguments": {
"site_id": 4212,
"binding_id": 1841,
"proposal": {
"database": {
"lines": ["wp option get siteurl"]
}
}
}
}If it is refused
| Reason | What to do |
|---|---|
forbidden | The 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_off | Rehearsals are paused by Corefinity (the exec switch); try again later. |
rehearsal_production | A production environment is never rehearsed on; rehearse on a staging environment of the site. |
busy | A rehearsal, deployment or other change of this environment is running; wait for it to finish, then call again. |
pipeline_untranslated | The pipeline carried over from CoreStack Enterprise is not translated yet; contact support. |
pipeline_review_pending | Pipeline lines carried over are waiting for review; accept them (corestack_deployments_carryover_accept) first. |
pipeline_switched_off | The deployment pipeline this binding needs is switched off; the person should contact Corefinity. |
pipeline_classic | The binding is not in build, database and post-deploy stages yet; it cannot be rehearsed. |
pipeline_locked | Corefinity has locked this pipeline; the proposal cannot be checked against it. |
tunnels_switched_off | The build needs tunnels, which are switched off right now; try again later. |
invalid_arguments | With 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_available | This environment has no binding the other environment's pipeline can run on. |
line_credentials | A proposed line holds a credential; move it into a secret variable (corestack_deployments_variable_set). |
line_own_shell | A 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_long | A proposed line is too long; shorten it. |
too_many_lines | A proposed stage has too many lines. |
managed_elsewhere | Another 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_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The 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_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |