Acquia Copilot is a conversational AI connected into our product documentation and knowledge base. Ask Copilot about product features, technical details, troubleshooting and how to get started with Acquia products.
An acquia_config.yaml file must exist at the root of the project.
Basic Frontend Hosting
A package.json file must be present at the root of the project.
The top-level directory of your project does not need to be kept as the application's root directory. To specify the root directory, add the directory path to the root_directory key in the acquia_config.yaml or acquia_config.yml file:
root_directory: "./"
Note
The default root directory is <project_root>/.
The output directory contains the results of a build. To specify the output directory, add the directory path to the output_directory section in the acquia_config.yaml file of the root directory.
The default output directory for Frontend Hosting Basic is <project_root>/out/.
For Frontend Hosting Advanced, specify the output_directory parameter in your acquia_config.yaml file if your application needs an output directory to be generated via the npm run build command. When output_directory is defined, Code Studio will execute the build process and manage the resulting artifacts . If output_directory is not specified, Code Studio assumes build artifacts are not needed and skips the npm run build command.
By default, Code Studio excludes the following file patterns from the build artifact:
.hg
.git
.gitmodules
.svn
.cache
.eslintrc
.now
.vercel
.npmignore
.dockerignore
.gitignore
.*.swp
.DS_Store
.wafpicke-*
.lock-wscript
.env.local
.env.*.local
.venv
npm-debug.log
config.gypi
node_modules
__pycache__
venv
CVS
Note
Code Studio does not exclude node_modules from the build artifacts when it is used with Frontend Hosting Advanced .
This job can be extended to run other necessary build commands.
Manage Secrets job
The Manage Secrets job is responsible for SSH key management.
Test stage
NPM Audit job
The NPM Audit job audits package dependencies for security vulnerabilities. For more information, visit the npmjs documentation.
To disable the job, add the NODE_JOBS_AUDIT environment variable in Code Studio and set it to false. For more information, visit Adding environment variables.
To disable the job, add the NPM_JOBS_CHECK environment variable in Code Studio and set it to false. For more information, visit Adding environment variables.
NPM ESLint job
The NPM ESLint job performs a static analysis of the code by using ESLint. If the root directory of the project already contains a .eslintrc file, Code Studio uses this file to determine the ESLint rules. Otherwise, Code Studio uses the default ESLint settings that adhere to the Standard.js rules.
To disable the job, add the NODE_JOBS_ESLINT environment variable in Code Studio and set it to false. For more information, visit Adding environment variables.
NPM Test job
The NPM Test job runs the predefined test commands. By default, this job is disabled. A predefined command must be specified in the test property of the scripts object of a package. For more information, visit the npmjs documentation.
To enable the job, add the NODE_TASKS_TEST environment variable in Code Studio and set it to true. For more information, visit Adding environment variables.
Static Application Security Testing (SAST) jobs
One or more SAST jobs perform a static scan of your code for security vulnerabilities.The number of jobs depends on the types of files committed to your repository. SAST results are saved as job artifacts. To access the SAST results within your Code Studio project, navigate to Build > Artifacts in the navigation bar.
The Secrets Detection job scans your code to ensure that you did not commit secrets, such as login credentials, to your repository. To access the results within your Code Studio project, navigate to Build > Artifacts in the navigation bar. For more information, visit Secret Detection.
Deploy stage
Create artifact from branch and Create artifact from tag jobs
These jobs push the build artifact to Cloud Platform. You can deploy build artifacts to a Cloud Platform environment. Build artifact names use <branch>-codestudio-build or <tag>-codestudio-build.
Enabling automatic deployment of tags in Code Studio
To automate tag deployment to your production environment, set the ACQUIA_JOBS_DEPLOY_TAG_ARTIFACT environment variable to true. Code Studio then:
Generates a build artifact.
Tags the artifact as <tag>-codestudio-build.
Pushes the tag to Cloud Platform.
Deploys the tag to production.
To deploy to an environment other than production, set the ACQUIA_CLOUD_SOURCE_ENVIRONMENT_ID variable to the target environment ID.
Enabling automatic deployment of branches in Code Studio
To automate branch deployment to a target environment, set ACQUIA_JOBS_DEPLOY_BRANCH_ARTIFACT to true and set ACQUIA_CLOUD_BRANCH_DEPLOY_ENV_ID to the target environment's ID. Code Studio then:
Generates a build artifact.
Creates a build branch with the naming convention <branch>-codestudio-build.
Pushes the branch to Cloud Platform.
Deploys the branch to production.
Branch-based deployments fail if ACQUIA_CLOUD_BRANCH_DEPLOY_ENV_ID is not set.
Branch-based deployment is skipped if the branch built in Code Studio already exists in the target Cloud Platform environment.
An acquia_config.yaml file must exist at the root of the project.
Basic Frontend Hosting
A package.json file must be present at the root of the project.
The top-level directory of your project does not need to be kept as the application's root directory. To specify the root directory, add the directory path to the root_directory key in the acquia_config.yaml or acquia_config.yml file:
root_directory: "./"
Note
The default root directory is <project_root>/.
The output directory contains the results of a build. To specify the output directory, add the directory path to the output_directory section in the acquia_config.yaml file of the root directory.
The default output directory for Frontend Hosting Basic is <project_root>/out/.
For Frontend Hosting Advanced, specify the output_directory parameter in your acquia_config.yaml file if your application needs an output directory to be generated via the npm run build command. When output_directory is defined, Code Studio will execute the build process and manage the resulting artifacts . If output_directory is not specified, Code Studio assumes build artifacts are not needed and skips the npm run build command.
By default, Code Studio excludes the following file patterns from the build artifact:
.hg
.git
.gitmodules
.svn
.cache
.eslintrc
.now
.vercel
.npmignore
.dockerignore
.gitignore
.*.swp
.DS_Store
.wafpicke-*
.lock-wscript
.env.local
.env.*.local
.venv
npm-debug.log
config.gypi
node_modules
__pycache__
venv
CVS
Note
Code Studio does not exclude node_modules from the build artifacts when it is used with Frontend Hosting Advanced .
This job can be extended to run other necessary build commands.
Manage Secrets job
The Manage Secrets job is responsible for SSH key management.
Test stage
NPM Audit job
The NPM Audit job audits package dependencies for security vulnerabilities. For more information, visit the npmjs documentation.
To disable the job, add the NODE_JOBS_AUDIT environment variable in Code Studio and set it to false. For more information, visit Adding environment variables.
To disable the job, add the NPM_JOBS_CHECK environment variable in Code Studio and set it to false. For more information, visit Adding environment variables.
NPM ESLint job
The NPM ESLint job performs a static analysis of the code by using ESLint. If the root directory of the project already contains a .eslintrc file, Code Studio uses this file to determine the ESLint rules. Otherwise, Code Studio uses the default ESLint settings that adhere to the Standard.js rules.
To disable the job, add the NODE_JOBS_ESLINT environment variable in Code Studio and set it to false. For more information, visit Adding environment variables.
NPM Test job
The NPM Test job runs the predefined test commands. By default, this job is disabled. A predefined command must be specified in the test property of the scripts object of a package. For more information, visit the npmjs documentation.
To enable the job, add the NODE_TASKS_TEST environment variable in Code Studio and set it to true. For more information, visit Adding environment variables.
Static Application Security Testing (SAST) jobs
One or more SAST jobs perform a static scan of your code for security vulnerabilities.The number of jobs depends on the types of files committed to your repository. SAST results are saved as job artifacts. To access the SAST results within your Code Studio project, navigate to Build > Artifacts in the navigation bar.
The Secrets Detection job scans your code to ensure that you did not commit secrets, such as login credentials, to your repository. To access the results within your Code Studio project, navigate to Build > Artifacts in the navigation bar. For more information, visit Secret Detection.
Deploy stage
Create artifact from branch and Create artifact from tag jobs
These jobs push the build artifact to Cloud Platform. You can deploy build artifacts to a Cloud Platform environment. Build artifact names use <branch>-codestudio-build or <tag>-codestudio-build.
Enabling automatic deployment of tags in Code Studio
To automate tag deployment to your production environment, set the ACQUIA_JOBS_DEPLOY_TAG_ARTIFACT environment variable to true. Code Studio then:
Generates a build artifact.
Tags the artifact as <tag>-codestudio-build.
Pushes the tag to Cloud Platform.
Deploys the tag to production.
To deploy to an environment other than production, set the ACQUIA_CLOUD_SOURCE_ENVIRONMENT_ID variable to the target environment ID.
Enabling automatic deployment of branches in Code Studio
To automate branch deployment to a target environment, set ACQUIA_JOBS_DEPLOY_BRANCH_ARTIFACT to true and set ACQUIA_CLOUD_BRANCH_DEPLOY_ENV_ID to the target environment's ID. Code Studio then:
Generates a build artifact.
Creates a build branch with the naming convention <branch>-codestudio-build.
Pushes the branch to Cloud Platform.
Deploys the branch to production.
Branch-based deployments fail if ACQUIA_CLOUD_BRANCH_DEPLOY_ENV_ID is not set.
Branch-based deployment is skipped if the branch built in Code Studio already exists in the target Cloud Platform environment.