Code Studio defines the following default jobs:
For a full list of the Drupal-optimized Auto DevOps jobs, see Drupal-optimized Auto DevOps jobs.
The Build Code job installs Composer dependencies. You can extend this job to construct front-end theme dependencies. For more information, see Adding a before_script or after_script to a Code Studio job.
The Validate Code Structure job validates that your repository is following the best practices in terms of which files are committed or ignored.
This job is permitted to fail. However, failure to follow the best practices can result in unexpected outcomes during the rest of the pipeline. Notably, it can result in problems with your deployment artifact.
The Manage Secrets job is responsible for SSH key management.
The Test Drupal job runs three types of tests. For each type, the tests run only if the defined conditions are met.
| Test Name | Purpose | Conditions | To enable: |
|---|---|---|---|
| PHP Code Sniffer | Validates that your custom code follows the established Drupal coding standards. |
|
|
| PHP Stan | Validates that your custom code does not rely on deprecated functions or services. |
|
|
| PHPUnit | Validates that your custom unit tests pass. |
Code Studio does not support PHPUnit code coverage. |
|
For an example, see drupal-recommended-project.
The SAST jobs statically scan your code for security vulnerabilities. This may be one or more jobs depending on the types of files committed to your repository. For example:
phpcs-security-audit.brakeman.For more examples, see Supported languages and frameworks
The Secrets Detection job scans your code to confirm that you have not accidentally committed any secrets, such as login credentials, to your repository.
For more information, see Secret Detection.
If you enable the Test Drupal job, Code Studio sets up the Drupal site before it performs the tests. For more information about enabling the Drupal site setup during the pipeline, and choosing a setup strategy, see Selecting the Drupal setup strategy in Code Studio.
The Deploy Branch to Acquia and Deploy Tag to Acquia jobs construct a build artifact that includes committed, contributed, and vendor directories. For example, it includes vendor and docroot/modules/contrib even if these directories are not committed to the source repository.
This job uses acli push:artifact to create the artifact.
Each time a pipeline runs in Code Studio on any branch, the system generates an artifact from that branch and pushes it to Acquia Cloud. The uploaded branch appears on Acquia Cloud with the name: CodestudioBranchName-codestudio-build
CodestudioBranchName refers to the branch name in Code Studio where the pipeline ran.
To deploy the branch to any environment on Acquia Cloud, follow these steps:
Select the Switch code button for your target environment.
Enter the branch name, using the same branch name as in Code Studio. The branch name on Acquia Cloud appears as CodestudioBranchName-codestudio-build.
To automate the tag creation process during deployment, set the ACQUIA_JOBS_DEPLOY_TAG_ARTIFACT CI/CD job to true in your Code Studio project.
After you set this job to true, Code Studio automatically performs the following steps every time you create a tag in Code Studio:
To configure this variable for all tags:
ACQUIA_JOBS_DEPLOY_TAG_ARTIFACT.https://code.acquia.com/help/user/project/protected_tags.md.To automatically deploy tags to an environment other than production, set the ACQUIA_CLOUD_SOURCE_ENVIRONMENT_ID CI/CD variable to be the environment ID of your target environment.
For more information about configuring continuous delivery in Code Studio, see How to implement real Continuous Delivery for Drupal on the Acquia Developer Portal.
The Composer Update job runs composer update against your repository, and submits any changes in a merge request.
The Deprecated Code Update job scans your custom code, such as custom modules and themes, for deprecated code. Using Drupal Rector, the job automatically replaces the deprecated code with updated, supported replacements. This is designed to preserve the same functionality, while removing any dependencies on deprecated functions, methods, classes, and so on.
| Build Drupal | Test Drupal | Automatic Updates | Deploy Drupal |
|---|---|---|---|
| Build code | Test Drupal | Composer update | Create artifact from branch |
| Validate code | sast | Drush update | Create artifact from tag |
| bandit-sast | Deprecated code update | Create Acquia CDE | |
| brakeman-sast | Delete Acquia CDE | ||
| eslint-sast | |||
| flawfinder-sast | |||
| kubsec-sast | |||
| gosec-sast | |||
| mobsf-android-sast | |||
| mobsf-ios-sast | |||
| nodejs-scan-sast | |||
| phpcs-security-audit | |||
| pmd-apex-sast | |||
| security-code-scan | |||
| semgrep-sast | |||
| sobelow-sast | |||
| spotbugs-sast | |||
| secret_detection | |||
| code_quality |
For more information about:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Code Studio defines the following default jobs:
For a full list of the Drupal-optimized Auto DevOps jobs, see Drupal-optimized Auto DevOps jobs.
The Build Code job installs Composer dependencies. You can extend this job to construct front-end theme dependencies. For more information, see Adding a before_script or after_script to a Code Studio job.
The Validate Code Structure job validates that your repository is following the best practices in terms of which files are committed or ignored.
This job is permitted to fail. However, failure to follow the best practices can result in unexpected outcomes during the rest of the pipeline. Notably, it can result in problems with your deployment artifact.
The Manage Secrets job is responsible for SSH key management.
The Test Drupal job runs three types of tests. For each type, the tests run only if the defined conditions are met.
| Test Name | Purpose | Conditions | To enable: |
|---|---|---|---|
| PHP Code Sniffer | Validates that your custom code follows the established Drupal coding standards. |
|
|
| PHP Stan | Validates that your custom code does not rely on deprecated functions or services. |
|
|
| PHPUnit | Validates that your custom unit tests pass. |
Code Studio does not support PHPUnit code coverage. |
|
For an example, see drupal-recommended-project.
The SAST jobs statically scan your code for security vulnerabilities. This may be one or more jobs depending on the types of files committed to your repository. For example:
phpcs-security-audit.brakeman.For more examples, see Supported languages and frameworks
The Secrets Detection job scans your code to confirm that you have not accidentally committed any secrets, such as login credentials, to your repository.
For more information, see Secret Detection.
If you enable the Test Drupal job, Code Studio sets up the Drupal site before it performs the tests. For more information about enabling the Drupal site setup during the pipeline, and choosing a setup strategy, see Selecting the Drupal setup strategy in Code Studio.
The Deploy Branch to Acquia and Deploy Tag to Acquia jobs construct a build artifact that includes committed, contributed, and vendor directories. For example, it includes vendor and docroot/modules/contrib even if these directories are not committed to the source repository.
This job uses acli push:artifact to create the artifact.
Each time a pipeline runs in Code Studio on any branch, the system generates an artifact from that branch and pushes it to Acquia Cloud. The uploaded branch appears on Acquia Cloud with the name: CodestudioBranchName-codestudio-build
CodestudioBranchName refers to the branch name in Code Studio where the pipeline ran.
To deploy the branch to any environment on Acquia Cloud, follow these steps:
Select the Switch code button for your target environment.
Enter the branch name, using the same branch name as in Code Studio. The branch name on Acquia Cloud appears as CodestudioBranchName-codestudio-build.
To automate the tag creation process during deployment, set the ACQUIA_JOBS_DEPLOY_TAG_ARTIFACT CI/CD job to true in your Code Studio project.
After you set this job to true, Code Studio automatically performs the following steps every time you create a tag in Code Studio:
To configure this variable for all tags:
ACQUIA_JOBS_DEPLOY_TAG_ARTIFACT.https://code.acquia.com/help/user/project/protected_tags.md.To automatically deploy tags to an environment other than production, set the ACQUIA_CLOUD_SOURCE_ENVIRONMENT_ID CI/CD variable to be the environment ID of your target environment.
For more information about configuring continuous delivery in Code Studio, see How to implement real Continuous Delivery for Drupal on the Acquia Developer Portal.
The Composer Update job runs composer update against your repository, and submits any changes in a merge request.
The Deprecated Code Update job scans your custom code, such as custom modules and themes, for deprecated code. Using Drupal Rector, the job automatically replaces the deprecated code with updated, supported replacements. This is designed to preserve the same functionality, while removing any dependencies on deprecated functions, methods, classes, and so on.
| Build Drupal | Test Drupal | Automatic Updates | Deploy Drupal |
|---|---|---|---|
| Build code | Test Drupal | Composer update | Create artifact from branch |
| Validate code | sast | Drush update | Create artifact from tag |
| bandit-sast | Deprecated code update | Create Acquia CDE | |
| brakeman-sast | Delete Acquia CDE | ||
| eslint-sast | |||
| flawfinder-sast | |||
| kubsec-sast | |||
| gosec-sast | |||
| mobsf-android-sast | |||
| mobsf-ios-sast | |||
| nodejs-scan-sast | |||
| phpcs-security-audit | |||
| pmd-apex-sast | |||
| security-code-scan | |||
| semgrep-sast | |||
| sobelow-sast | |||
| spotbugs-sast | |||
| secret_detection | |||
| code_quality |
For more information about:
If this content did not answer your questions, try searching or contacting our support team for further assistance.