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
Open the organisation's deployments
Go to Organisation › Organisations, choose your organisation, then Deployments under Developers. Under Deployment templates, choose Open beside the platform.
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
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.
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.
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
Open Where it's used
Choose Where it's used on the template page.
| State | What it means |
|---|---|
| Follows | The stage is the template's and changes when the template is saved. |
| Changed here | Someone set the stage on that environment. A template save leaves it alone. |
| Kept | The 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
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.
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"
]
}
}'Your assistant calls corestack_deployments_template_stage_update.
{
"name": "corestack_deployments_template_stage_update",
"arguments": {
"platform": "magento2",
"config": "production",
"stage": "post_deploy",
"revision": 4,
"mode": "replace",
"value": {
"lines": [
"php bin/magento cache:flush"
]
},
"dry_run": true
}
}