Workflows enable you to automate continuous integration and continuous delivery processes in your Convox environment. They provide a way to build, test, and deploy your applications automatically in response to events such as code pushes or pull requests.
Convox offers two types of workflows:
Workflows integrate directly with GitHub and GitLab, making it easy to automate your development pipeline with minimal configuration.
Review workflows allow you to test new versions of your application based on pull requests. When configured, Convox automatically builds your application whenever a pull request is created for a connected repository. Optionally, Convox can run tests and create temporary review applications, enabling thorough testing before merging changes.
Setting | Description |
---|---|
Repository | The connected GitHub or GitLab repository that will trigger the workflow |
Manifest | The Convox manifest file to use (defaults to convox.yml ) |
Rack | The Rack where review applications will be deployed |
Run tests | Enable to run the test command specified in your convox.yml |
Deploy Demo | Enable to create a temporary review application that will be deleted when the PR is merged |
Before Promote | Specify a service and command to run before promotion (e.g., database migrations) |
After Promote | Specify a service and command to run after promotion (e.g., notifications) |
Demo Environment | Define environment variables for review applications |
When a review workflow is triggered:
Deployment workflows automate the process of deploying your application to staging and production environments. They are triggered when code is merged into specified branches in your repository.
Setting | Description |
---|---|
Repository | The connected GitHub or GitLab repository |
Workflow Name | A descriptive name (e.g., “Staging Deploy”) |
Branch | The branch that triggers the workflow when code is merged |
Manifest | The Convox manifest file to use (defaults to convox.yml ) |
Applications | One or more applications to deploy to, with promotion settings |
Run tests | Enable to run the test command specified in your convox.yml |
Before Promote | Specify a service and command to run before promotion |
After Promote | Specify a service and command to run after promotion |
Environment | Define environment variables for the deployment |
For each application in a deployment workflow, you can specify:
You can manually trigger a deployment workflow at any time:
Each workflow run creates a job that can be monitored and managed through the Convox Console.
The job details page provides:
You can also manage workflows via the Convox CLI:
$ convox workflows
ID KIND NAME
55dd9440-eb98-4d9b-816f-9923ee77feff deployment deployweb-app
c828b45a-070b-46ed-9c43-ddaa905ecd68 review review-web-app
$ convox workflows run 55dd9440-eb98-4d9b-816f-99230077feff --branch feat-branch --title "title"
Successfully trigger the workflow, job id: 65a4160a-27cd-47c6-ba74-aaaaaaaa
This workflow automatically deploys a temporary version of your application for each pull request:
When a pull request is opened, a fully functional version of your application is deployed with the changes from the PR, allowing thorough testing before merging.
For teams using GitFlow:
develop
branchmaster
branchThis strategy builds your application once and deploys it to multiple environments:
master
branchWith this approach, code merged to master is automatically deployed to staging and simultaneously prepared for production. Once validated in staging, you can promote the identical build to production with one click.
By effectively using Convox workflows, you can automate your entire development pipeline from pull request to production, ensuring consistent testing and deployment processes across your applications.