---
title: "Code Studio: Automated Code Updates"
date: "2022-05-19T01:07:16+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/code-studio/help/90621-code-studio-automated-code-updates"
id: "516941f2-eaf8-437e-b246-1f60b1d1a209"
---

Table of contents will be added

Goal
----

Configuring Acquia Code Studio to run automated updates

Prerequisites
-------------

*   Access to Code Studio
    

Overview
--------

As a developer, we’ve all experienced the time it takes to maintain a Drupal application, let alone 100s. Pulling the latest code changes, creating a new feature branch, syncing the DB from PROD to grab the latest content, updating composer, exporting configuration and pushing back up. Even if you are already set up with a local or Cloud IDE, this can take some time. Yes, there are tools we can use to speed up this process, drush, hosting CLIs, automated scripts… but again, this is just more to maintain and update to newer versions, when PHP or other software gets released.

Today, hundreds of Acquia clients take advantage of our [Remote Administration](https://www.acquia.com/products/drupal-cloud/cloud-platform/enterprise-remote-administration) service, a fully-managed site administration that lets you view site updates in a private staging environment and deploy them automatically once approved. With the [Remote Administration](https://www.acquia.com/products/drupal-cloud/cloud-platform/enterprise-remote-administration) service, Acquia handles typical and routine Drupal administration tasks so your team can focus on developing new features or on completing other high-value tasks. This has been essential for larger teams to coordinate updates and maintain fleets of sites.

As you know, a CI/CD pipeline is also one of the most valuable tools a team can use to ensure the code is scanned for governance, standards and security. [Acquia CI/CD Pipelines](https://www.acquia.com/products/drupal-cloud/cloud-platform/deployment-automation) has been the solution for many of our clients in order to build better code, fix bugs faster, reduce risk and in general, smoothen the path to production.

![Blue droplet shape with a robot face featuring code symbols inside. The design suggests technology or programming.](https://acquia.widen.net/content/24fd0238-7ca6-4783-a566-b1279c763024/web/url_62ef0e31c3dbc09247daa6722ae021d8.png)

With Acquia’s recent release of [Code Studio](https://www.acquia.com/products/drupal-cloud/code-studio), we’ve partnered with GitLab to provide our customers with a fully managed CI/CD pipeline for Drupal optimized Auto DevOps; and remote administration procedures into Acquia’s Automatic Updates. Acquia hosts and maintains GitLab on our next generation Cloud Platform giving customers best-in-class GitLab plus Acquia-only features that make building and updating Drupal easier than ever. Code Studio comes with a number of pre-built automations to support low-configuration, continuous integration, and continuous delivery of Drupal 9+ projects to Acquia Cloud Platform hosted applications.

![GitLab project page for "Eudaimonia" showing repository details, commit history, and files list. Includes branches, tags, and last commit information.](https://acquia.widen.net/content/18ce42d0-a7a6-4eac-b81a-ba661ade976e/web/url_790610683b1be4349c28a75c0871ceea.webp)

Code Studio provides automatic code updates through scheduled CI/CD builds. Simply create a scheduled pipeline and when it runs, Code Studio will:

*   Scan your code for outdated Composer Packages (e.g., Drupal Core) and deprecated code (e.g., your custom module(s))
    
*   If updates are available, it will create new merge request(s)
    
*   These merge requests will trigger the AutoDevops pipelines, automatically testing the changes and staging them on an Acquia CDE.
    
*   Click the \`view app\` button in the Merge Request to view the CDE on Acquia Cloud. This gives you the ability to test the update prior to merging the changes.
    
*   Once the build finishes for the newly merged code, you can use your normal release process to get these changes into production, especially if these are security updates.
    

1.  Enable automatic code updates
    -----------------------------
    
    Automatic Updates will be automatically enabled by default when you follow the [Creating/Configuring a Code Studio (GitLab) project for your Cloud Application](/node/55936) instructions.
    
    However, you can create additional scheduled pipelines and trigger them on demand by following the instructions below.
    
2.  Create a new scheduled pipeline
    -------------------------------
    
    Just click the \`New schedule\` button to create a new scheduled job.
    
    ![GitLab scheduling pipelines interface showing a schedule list, with options to create a new schedule and manage existing ones.](https://acquia.widen.net/content/47362713-b6ef-47b3-9788-d1c80ab32943/web/url_8ac0139e423b4b3a18debe8cbf14656b.png)
    
    Set the frequency to whatever you’d like. Once per week is recommended as [Drupal.org](https://www.drupal.org/about/core/policies/core-release-cycles/schedule#monthly) security releases come out on the first and third Wednesday of each month.
    
    ![GitLab interface for scheduling a new pipeline, featuring options for description, interval pattern, timezone, target branch, and variables.](https://acquia.widen.net/content/1e9602ae-0131-4c9d-8516-84efe254bfd2/web/url_b4840916818dce8eff70a94c80281577.png)
    
    Make sure to change the Target Branch or Tag to fit your internal workflow.
    
    ![Edit Pipeline Schedule interface showing settings for automatic updates, including interval pattern, timezone, and activation options.](https://acquia.widen.net/content/a12ea0aa-0f3b-43bf-9c65-4b1a335d7428/web/url_597f5a68f6e5acd4fc6baad5bdecccc0.png)
    
3.  Test your new scheduled build
    -----------------------------
    
    You can test this on-demand automated pipeline by clicking the “play” button
    
    ![GitLab scheduling pipelines interface showing a scheduled task, with options for ownership and deletion. Navigation menu on the left.](https://acquia.widen.net/content/d7f759ec-732a-4ef1-99e6-94c28533a9fa/web/url_e6146de32fe93953d851935fa1edfcee.png)
    
    This will create new merge requests with the updates.
    
    ![GitLab interface showing open merge requests for code updates, with details like creation date and user. A red arrow points to a request.](https://acquia.widen.net/content/30f319b6-0287-496b-a54c-3c0f9e3af121/web/url_6572a16273c5b577abb1b6fdc13cd150.png)
    
4.  Review the Merge Request details
    --------------------------------
    
    Looking closer into this merge request, the automated workflow will output the release notes as well as the ability to review the diff.
    
    ![GitLab interface showing a merge request for automatic Composer package updates, listing package changes with versions.](https://acquia.widen.net/content/99560834-a938-416c-b492-93f15152f63b/web/url_4f4fa5a9e11cd0a5767eb5e101919d47.png)
    
    ![GitLab interface showing a merge request for updating Composer packages, with code changes highlighted in red and green.](https://acquia.widen.net/content/814d9177-35c5-4860-995d-c53a5edda3e3/web/url_c2e29a9d29a8e3b907d4a99086b2a69a.png)
    

You can see with a couple simple steps, you can set up an automated process that can be easily integrated into your current workflow. To learn more about [Code Studio](https://www.acquia.com/products/drupal-cloud/code-studio) and our Drupal optimized Auto DevOps review the resources below.

Additional Resources
--------------------

*   [Learn more about Acquia Code Studio](https://www.acquia.com/products/drupal-cloud/code-studio)
*   [Getting started with Code Studio](/node/55936)
*   [Acquia Code Studio Product Guide](/node/55936)