CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 46 of 65

corestack_enterprise_deployment_settings_update

Change CoreStack Enterprise deployment settings.

Scope writeNo secrets returned
On this page

When to use it

Change how a CoreStack Enterprise environment deploys: turn its deployment pipeline on or off, set the deployment source (manual or git), or choose whether a git push deploys at once (automatic) or waits for someone to deploy it (manual). Send only what changes; the settings are saved together, and a setting already as asked is no change. These are the Deployments tab's Enable / Disable Deployment Pipeline buttons and its Deployment Source and Git Deployment Type fields. The answer is the settings after the change.

It also sets one pipeline's web folder (root_directory) or storage folder (root_storage): name the pipeline by pipeline_id (one of the pipelines the settings list; their folders_editable says whether the person may). A folder must be the site's own folder: an absolute path of letters, numbers, dots, dashes, underscores and slashes, ending with a slash, under /var/www/, /var/www_m2/, /var/www_vsf/ or /var/www_blog/, never one of those itself nor /var/www/vhosts/. On an environment that builds on a shared build server, a folder another customer's site on the same server uses, or one inside or above it, is refused. A folder sent unchanged is no change. The Control Panel's pipeline form and PATCH /api/environments/{environment}/deployment-settings apply the same rule in the same words.

It also sets one version 2 pipeline's two build switches, by pipeline_id the same way (their build_switches_editable says whether the person may):

  • pause_crons_during_build (default true) pauses cron jobs and queue consumers while the build commands run. false keeps them running until the release goes live; the database commands still pause them first. While a build command may change the database (setup:upgrade, app:config:import, a database client, or a script the Control Panel cannot read), they pause anyway, and the settings' notes name the command.
  • isolate_build_var (default false; Magento 2 pipelines whose var folder is on shared storage) gives the build commands their own var folder, linked to the shared one just before the release is packaged, so nothing they write there reaches the live site, maintenance mode included. Database changes that need maintenance mode belong in the database commands, with maintenance mode switched on; the notes name any build command this concerns.

Moving an environment off git removes its repositories and their webhooks. When it has any, the call is refused confirm until it says confirm_remove_repositories: true: ask the person first.

The public API's PATCH /api/environments/{environment}/deployment-settings does the same.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_enterprise_deployment_settings_update with enterprise_env_id 1530, git_deploys automatic. (Change CoreStack Enterprise deployment settings.) Tell me what it returned.

Inputs

confirm_remove_repositoriesboolean

true once the person agreed: moving off git removes the repositories and their webhooks.

deployment_sourcestring

Only an environment already on SFTP may choose sftp.

manualgitsftp
enterprise_env_idintegerRequired

A CoreStack Enterprise environment's id; for CoreStack or CoreCluster use the corestack_deployment_* tools. At least 1.

git_deploysstring
manualautomatic
isolate_build_varboolean

With pipeline_id, Magento 2 version 2 pipelines whose var folder is on shared storage only: true gives the build commands their own var folder, linked to the shared one just before the release is packaged, so nothing they write there (maintenance mode included) reaches the live site; false (the default) keeps today's shared var during the build.

pause_crons_during_buildboolean

With pipeline_id, version 2 pipelines only: true (the default) pauses cron jobs and queue consumers while the build commands run; false keeps them running until the release goes live. They still pause when a build command may change the database (the answer's notes say which).

pipeline_enabledboolean
pipeline_idinteger

The pipeline whose folders change: one of the settings' pipelines. Required with root_directory or root_storage. At least 1.

root_directorystring

The pipeline's web folder: the site's own folder under /var/www/, /var/www_m2/, /var/www_vsf/ or /var/www_blog/, ending with a slash. Up to 255 characters.

root_storagestring

The pipeline's storage folder, under the same rule. Up to 255 characters.

Example call

tools/call
{
  "name": "corestack_enterprise_deployment_settings_update",
  "arguments": {
    "enterprise_env_id": 1530,
    "git_deploys": "automatic"
  }
}

If it is refused

ReasonWhat to do
not_availableA DevBox environment ("A DevBox environment has no deployment pipeline."); a source or git setting while the pipeline stays off; git_deploys on an environment that does not deploy from git.
forbiddendeployment_source or git_deploys is named and the person's role lacks the Manage Deployment Source permission (asked even when the setting is already as named). The message names it and says an owner of the company can grant it in Roles; details.permission is manageDeploymentSource. Nothing is changed. Also forbidden: moving deployment_source off git removes the environment's repositories, so it needs the Manage Deployment Repositories permission as well (manageDeploymentRepositories, asked before confirm); and a change that makes a push deploy on its own (git_deploys from manual to automatic, or deployment_source back to git while git deploys are already automatic) needs the Create Deployments permission as well (createDeployments). Turning it off, or a setting sent as it already is, needs nothing more. A pipeline's folders are the pipeline's: changing them needs the Edit Environment Deployment Pipeline permission (editEnvironmentDeploymentPipeline; that pipeline's folders_editable is false without it), and nothing in the call is changed.
confirmMoving off git would remove the environment's repositories.
invalid_argumentsNothing to change, sftp on an environment not already on it ("SFTP deployments are no longer offered."), or a CoreStack or CoreCluster environment (field enterprise_env_id; use the corestack_deployments_* tools by site_id).
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
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.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
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