CorefinityCorefinityDocs
Open the Control PanelControl Panel
Code and deployments · 7 of 10

Deployment templates

Set the pipeline stages for every site of a platform in your organisation, and see which environments follow them.

On this page

Before you start

  • You are an owner, or your role has Edit Environment Deployment Pipeline. Every user of the organisation can read its templates.
  • A template holds the Build, Database, After deploy and Settings stages for one platform, such as Magento 2. Until you set a stage it comes from Corefinity's default.
  • The repository, branch, Node.js version, variable values, registry tokens, shared paths and deployment options stay with each environment.

Open a template

  1. Open the organisation's deployments

    Go to Organisation › Organisations, choose your organisation, then Deployments under Developers. Under Deployment templates, choose Open beside the platform.

  2. Read the template

    Where this comes from shows the order a stage is taken from, ending with the environment. Production is used by every production environment, and UAT by every other environment, such as Staging.

Change a stage for every site

  1. Set the stage

    Choose Edit on the stage, then Set for your organisation in place of Inherit from. Edit the stage as on a site: see Pipeline.

  2. Review where it reaches

    Choose Review and save. The dialog lists What changes and every environment the change reaches: tick Keep the current stage here to leave one as it is.

  3. Confirm and save

    Under Confirm the production change, type the number of production environments, then choose Save.

Each environment runs the new stage from its next deployment. The change is recorded in Activity on every site it reaches, and in the template's History.

See which environments follow a template

  1. Open Where it's used

    Choose Where it's used on the template page.

StateWhat it means
FollowsThe stage is the template's and changes when the template is saved.
Changed hereSomeone set the stage on that environment. A template save leaves it alone.
KeptThe environment kept its own stage when the template was saved.

To bring environments back to the template, tick them and choose Reset to template…. History lists every saved revision of the template: compare one with another, or restore it.

The same section holds your organisation's variables and registries: see Variables and Private registries.

Automate this

Deployment templates

Sets one stage of the template, or hands it back to what it inherits, and writes the change through to every environment that follows that stage.

PUT/api/corestack/companies/{company}/deploy-templates/{platform}/{config}/stages/{stage}
curl -X PUT https://manage.corefinity.com/api/corestack/companies/1204/deploy-templates/magento2/production/stages/post_deploy \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_count": 1,
    "confirm_production": true,
    "confirm_targets": [
      1042
    ],
    "mode": "replace",
    "revision": 2,
    "value": {
      "lines": [
        "php bin/magento cache:flush",
        "php bin/magento cron:install"
      ]
    }
  }'
Was this helpful?
Open in ClaudeOpen in ChatGPT