As described in Code Studio’s AutoDevOps, Code Studio provides a zero-configuration-required CI/CD build that is optimized for Drupal. Each time you make a commit it will be automatically tested in a variety of ways (e.g., PHPCS, PHPStan, PHPUnit, etc.). When you create a merge request, Code Studio will both test your code and also spin up a review environment (CDE) that you can directly access and test in a browser. When you click merge, it will automatically generate an artifact and deploy the change to a corresponding branch on the Acquia Cloud Platform.
That’s all great, but what about the release process?
Traditionally, you would create a tag, manually deploy it somewhere, and run through some type of “launch checklist”. But! If you so choose, we can automate that too. Just set the
ACQUIA_JOBS_DEPLOY_TAG_ARTIFACT CI/CD variable to true in your Code Studio project.
Note the "Protect variable" checkbox. You should either:
- Uncheck this so that it applies to all tags.
- Check this AND configure Code Studio to protect your tags automatically.
When you do this, Code Studio will execute the following steps automatically each time that you create a tag in Code Studio:
- Generate a deployment artifact
- Tag the artifact
- Push the tag to Acquia Cloud
- Deploy that tag to production.
If you’d rather automatically deploy to an environment other than production, you can! Just set the
ACQUIA_CLOUD_DESTINATION_ENVIRONMENT_ID CI/CD variable to be the environment ID of your target environment.
Finally, you can automate tasks that will happen after you deploy your code by using Acquia Cloud Hooks.
In detail, these are the Acquia features that will help you accomplish each step: