CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 62 of 65

corestack_deployments_shared_files_check

Shared files check.

Scope readNo secrets returnedCoreCluster
On this page

When to use it

Before you start a deployment (corestack_deployment_trigger) or a rehearsal (corestack_deployments_rehearse), check that the settings file the platform needs (.env for Laravel, app/etc/env.php for Magento, wp-config.php for WordPress, .env.local and install.lock for Shopware, config.php for Shopware 5; a PHP site needs none of its own) is where the deployment links it from. A deployment or a rehearsal without it, and without a copy in the repository, stops at linking shared files, and the site keeps serving its current release.

The check only advises. A deployment or a rehearsal is never refused for its answer, and a file it reports missing may still come from the repository, which no check can see before the build. Tell the person what it found and let them decide: never wait for state: ok before starting, and never require the file to be created first. A refused check (below) holds nothing back either.

Each required file is looked for where the deployment takes it from, in order: the environment's shared folder; the live release's own copy, which a deployment moves into the shared folder and links back (a rehearsal links it); for a rehearsal, a flat htdocs folder (an environment not yet in the releases layout). A file in none of them is missing, and its message names the full path and where to create it over SFTP or SSH; if the repository ships its own copy, the deployment uses that copy instead. A file that is there (in the shared folder, the live release or a flat htdocs) but that the site cannot read, or one in the shared folder that leads outside the site, is unreadable, and its message names the copy. On Shopware, a deployment counts install.lock only in the shared folder, and a missing one means the shop has no database yet. A WordPress site built with Bedrock needs no wp-config.php. An environment deployed by upload answers not_applicable.

The answer is {for, state, message, files[]}: state is ok, missing (any file missing or unreadable) or not_applicable; each file has path, shared_path, status (present, from_live_release, from_htdocs, missing, unreadable) and message. Show the person the message of each missing or unreadable file, and say that a copy in their repository would be used instead.

The same check in the public REST API, with the same rules, refusals and scope: GET /api/corestack/sites/{site}/deployments/shared-files?for=deployment.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_deployments_shared_files_check with site_id 4211, for deployment. (Shared files check.) Tell me what it returned.

Inputs

forstring

deployment (the default) or rehearsal: a rehearsal also takes a file from a flat htdocs folder. Defaults to deployment.

deploymentrehearsal
site_idintegerRequired

The environment to deploy, or the non-production environment to rehearse on. At least 1.

Example call

tools/call
{
  "name": "corestack_deployments_shared_files_check",
  "arguments": {
    "site_id": 4211,
    "for": "deployment"
  }
}

If it is refused

ReasonWhat to do
switched_offRunning commands on sites is switched off at the moment; the check reads the site's files, so it waits too.
not_runningThe site is not running; start it first.
temporarily_unavailableThe site's files could not be read from the pod; try again in a moment.
rate_limited10 checks a minute per person, shared with the Control Panel and the public API.
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
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.
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