---
title: "corestack_enterprise_deployment_settings_update"
url: https://docs.corefinity.com/mcp/tools/corestack_enterprise_deployment_settings_update
type: tool
last_updated: 2026-11-13
feature: enterprise-deployments
related:
  - https://docs.corefinity.com/guides/corestack-enterprise/deployments-and-pipelines.md
---
# corestack_enterprise_deployment_settings_update

**Change CoreStack Enterprise deployment settings.** Turn a CoreStack Enterprise environment's deployment pipeline on or off, set its deployment source, choose manual or automatic git deploys, set one pipeline's web or storage folder within the site's own folder, or choose whether one pipeline pauses cron jobs during the build and whether its build gets its own var folder. Scope: write.

- Scope: `write`
- Runs as a task: no

## 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.

## Inputs

- `enterprise_env_id` (integer, ≥ 1, required)
- `pipeline_enabled` (boolean)
- `deployment_source` (`manual`, `git`, or `sftp` for an environment already on it)
- `git_deploys` (`manual` or `automatic`)
- `confirm_remove_repositories` (boolean; `true` once the person agreed)
- `pipeline_id` (integer, ≥ 1; required with `root_directory`, `root_storage`, `pause_crons_during_build` or
  `isolate_build_var`)
- `root_directory` (string, up to 255 characters; ends with `/`)
- `root_storage` (string, up to 255 characters; ends with `/`)
- `pause_crons_during_build` (boolean)
- `isolate_build_var` (boolean)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_remove_repositories": {
      "description": "true once the person agreed: moving off git removes the repositories and their webhooks.",
      "type": "boolean"
    },
    "deployment_source": {
      "description": "Only an environment already on SFTP may choose sftp.",
      "enum": [
        "manual",
        "git",
        "sftp"
      ],
      "type": "string"
    },
    "enterprise_env_id": {
      "description": "A CoreStack Enterprise environment's id; for CoreStack or CoreCluster use the corestack_deployment_* tools.",
      "minimum": 1,
      "type": "integer"
    },
    "git_deploys": {
      "enum": [
        "manual",
        "automatic"
      ],
      "type": "string"
    },
    "isolate_build_var": {
      "description": "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.",
      "type": "boolean"
    },
    "pause_crons_during_build": {
      "description": "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).",
      "type": "boolean"
    },
    "pipeline_enabled": {
      "type": "boolean"
    },
    "pipeline_id": {
      "description": "The pipeline whose folders change: one of the settings' pipelines. Required with root_directory or root_storage.",
      "minimum": 1,
      "type": "integer"
    },
    "root_directory": {
      "description": "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.",
      "maxLength": 255,
      "type": "string"
    },
    "root_storage": {
      "description": "The pipeline's storage folder, under the same rule.",
      "maxLength": 255,
      "type": "string"
    }
  },
  "required": [
    "enterprise_env_id"
  ],
  "type": "object"
}
```

## Refusals

- `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` (field `confirm_remove_repositories`): 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`).
- `invalid_arguments` on a folder (field `root_directory` or `root_storage`), nothing else in the call changed:
  - "Use an absolute folder path made of letters, numbers, dots, dashes, underscores and slashes, ending with a slash,
    such as /var/www/vhosts/example.com/."
  - "Choose a folder under /var/www/, /var/www_m2/, /var/www_vsf/ or /var/www_blog/, such as /var/www/example.com/."
  - "Choose your site's own folder, such as /var/www/example.com/, not the folder every site shares."
  - "Write the folder plainly, without ./ or //, such as /var/www/example.com/."
  - "Another site on the same build server uses that folder, or one inside or above it. Choose your site's own folder."
    (it never names the other site)
  - "Another pipeline folder change on the same build server is being saved. Try again in a moment." (two changes on
    one build server are saved one at a time; try again)
  - "Only Corefinity staff can change the pipeline's folders. Ask support if they need to change." (a CoreStack, mirror
    or version 3 pipeline)
- `invalid_arguments` on `pipeline_id`: "Choose one of this environment's pipelines." (another environment's pipeline
  answers exactly as a missing one), "Send pipeline_id with root_directory, root_storage, pause_crons_during_build or
  isolate_build_var to say which pipeline they belong to.", "Send root_directory, root_storage, pause_crons_during_build
  or isolate_build_var with pipeline_id."
- `invalid_arguments` on a build switch that is not a boolean: "pause_crons_during_build must be true or false." (or
  isolate_build_var)
- `not_available` on a build switch the pipeline does not have, nothing in the call changed: "This setting applies only
  to a version 2 pipeline.", "This setting applies only to a Magento 2 pipeline whose var folder is on shared storage."
- `forbidden` on a build switch, as on a folder: a role without Edit Environment Deployment Pipeline
- `tenant_mismatch`, `pin_refused`, and the refusals every tool can answer: `scope_required`, `rate_limited`,
  `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_enterprise_deployment_settings_update",
  "arguments": {
    "enterprise_env_id": 1530,
    "git_deploys": "automatic"
  }
}
```

```json
{
  "name": "corestack_enterprise_deployment_settings_update",
  "arguments": {
    "enterprise_env_id": 1530,
    "pipeline_id": 2210,
    "root_directory": "/var/www_m2/example.co.uk/"
  }
}
```

```json
{
  "name": "corestack_enterprise_deployment_settings_update",
  "arguments": {
    "enterprise_env_id": 1530,
    "pipeline_id": 2210,
    "pause_crons_during_build": false
  }
}
```

## Prompt

```text
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.
```

## The same task elsewhere

- Guide: [Deployments and pipelines](https://docs.corefinity.com/guides/corestack-enterprise/deployments-and-pipelines.md)
