Pipeline
See the stages a deployment runs through and change the commands and settings of each.
On this page
Before you start
- You can open the site in Managed Websites. Anyone who can open a site can read its pipeline.
- To change the pipeline you are an owner, or your role has Edit Environment Deployment Pipeline.
- Each environment has its own pipeline: choose Production or Staging in the site header first.
What each stage does
Go to Managed Websites, choose the site, then Deployments under Code & backups. The Pipeline card is under Deployment mode.
| Row | Where it runs | What it holds |
|---|---|---|
| Build | On the Corefinity build server | A Preset for the platform with your own commands around it, or Custom commands. |
| Database | In this environment, before the new release goes live | Your database commands and the maintenance page. |
| After deploy | In this environment, once the new release is live | Commands such as a cache flush. A failure here marks the deployment Failed, and the site keeps serving the new release. |
| Settings | The maintenance page, tunnels to the site's services during the build, scheduled tasks and the queue, and timeouts. |
A row that reads From Corefinity's default follows a template and changes when the template does: see Deployment templates.
Change a stage
Open the stage
Choose Edit on the stage's row. On a stage that follows a template, choose Change for this environment.
Add commands and save
Enter one command per line, or choose one from Insert a common command…, then choose Save. The line under the editor counts your commands, and a line that cannot run is listed with the reason.
The next deployment of this environment runs the new stage. To follow the template again, open the stage and choose Reset to template.
Try the change on Staging before it reaches Production: see Rehearse a pipeline.
See the run order and earlier versions
Open the run order
On the Pipeline card, open the … menu and choose Run order and version history. Run order numbers every step of a deployment, from the first build command to the last after-deploy command.
Compare or restore a version
Choose Versions. Every save is a revision with who saved it and what changed: choose Diff to see the change, or Restore this version on an earlier revision to bring it back.
Automate this
Replaces one stage and answers the whole pipeline; the next deployment runs the saved stage.
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/2210/stages/post_deploy \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"lines": [
"php artisan queue:restart",
"php artisan config:cache"
],
"revision": "413c6ef3a8a3ffe9"
}'Your assistant calls corestack_deployments_pipeline_stage_update.
{
"name": "corestack_deployments_pipeline_stage_update",
"arguments": {
"site_id": 4211,
"stage": "post_deploy",
"revision": "r-8f2c",
"lines": [
"php artisan queue:restart"
]
}
}