corestack_ enterprise_ deployment_ settings_ update
Change CoreStack Enterprise deployment settings.
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 / 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(defaulttrue) pauses cron jobs and queue consumers while the build commands run.falsekeeps 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'notesname the command.isolate_build_var(defaultfalse; 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; thenotesname 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 / does the same.
Ask for it
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
true once the person agreed: moving off git removes the repositories and their webhooks.
Only an environment already on SFTP may choose sftp.
manualgitsftpA CoreStack Enterprise environment's id; for CoreStack or CoreCluster use the corestack_deployment_* tools. At least 1.
manualautomaticWith 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.
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).
The pipeline whose folders change: one of the settings' pipelines. Required with root_directory or root_storage. At least 1.
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.
The pipeline's storage folder, under the same rule. Up to 255 characters.
Example call
{
"name": "corestack_enterprise_deployment_settings_update",
"arguments": {
"enterprise_env_id": 1530,
"git_deploys": "automatic"
}
}If it is refused
| Reason | What to do |
|---|---|
not_available | A 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. |
forbidden | deployment_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. |
confirm | Moving off git would remove the environment's repositories. |
invalid_arguments | Nothing 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_mismatch | The object does not exist or the token may not see it. Check the id. |
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. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
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. |