Augmenting CI/CD with Artificial Intelligence

Joshua Knight, Platform Technical Architect at Kainos, discusses the integration of Generative AI into CI/CD workflows through our AI Enhanced Platform (AEP).
Date posted
10 July 2024
Reading time
4 minutes
Joshua Knight
Platform Technical Architect ·

As engineers, we’re constantly adapting our ways of working and tooling in response to the rapidly changing technologies available in the platform space. As new technologies emerge and evolve, their adoption can bring increased efficiency, security and performance – in addition to improving our overall user experience with the tools that we interact with daily.

This pursuit of innovation isn't always straightforward, and the path to integrate these technologies often isn’t seamless. In the current technical landscape, there’s a lot of discussion around the value that Generative AI can bring – but aside from the existing commercial offerings, how do we begin to utilise this technology to augment our existing workflows?

Introducing AI Enhanced Platform (AEP)

To streamline AI integration and empower engineers, we’ve developed the AI Enhanced Platform (AEP). It consists of a suite of agents that leverage Large Language and Machine Learning Models to enhance Azure DevOps and GitHub Actions solutions with Generative AI workflows.

AEP has been developed using an accessible but robust tech stack, including Docker, Python and Terraform, hosted on the Azure Cloud Platform. We chose these technologies for their extensible support, large community, and familiarity to those working within spaces that involve CI/CD solutions.

image

Built using Python’s FastAPI implementation, underpinned with an authentication middleware, and integrated with Azure AI Content Safety for protection against malicious prompts, AEP offers an out-of-the-box framework to seamlessly integrate AI into your tooling. The AEP solution has been configured with a focus on flexibility, ensuring its functionality is accessible to various CI/CD compositions. If you can send a simple HTTP request, you can start enhancing your workflows with Generative AI.

AEP version 1

With version 1 of AEP, we have pre-loaded several functionalities for your use:

  • AI-driven pull request summaries: Get a summary of the changes within your pull request using Generative AI. AEP will digest the changes that are included in your pull request and craft a legible summary that can be easily understood in seconds. This provides engineers with an accurate understanding of pull request intention and valuable context before conducting their review. Supports: GitHub, Azure DevOps.
  • AI-driven pull request (PR) review: Get AI-driven insights on the changes within your pull request using AI. Once a PR has been submitted, our AEP will carry out a code review and post an update to the pull request conversation thread. Here you will be able to see advice and guidance on best practice, security aspects and code quality, as well as providing recommendations as to where improvements can be made. Supports: GitHub, Azure DevOps.
  • AI-driven pull request review with project board context: Get a review of your pull request and an analysis of its done status based on the linked work items. Once a PR has been submitted, the AEP tool will review the changes that are contained within the pull request and any associated work items from Azure Boards. Using the data gathered from these reviews, our AEP will perform an analysis on the level of completeness of the work items and determine their done status. Supports: Azure DevOps.

Whilst we have provided the above functionalities, the AEP solution also enables you to create your own features and provide your own prompts. This allows you to customise the experience and enhance areas of the CI solutions with Generative AI to meet development needs.

If you're ready to explore what the AEP can do or have ideas on how to utilise the AEP framework, follow these steps:

  1. Fork our open source repository.
  2. Follow the hosting guide.
  3. Start using the AEP - and get experimenting.
image

Building in public

At Kainos, we're committed to contributing to the broader technical community. We recognise the benefits of knowledge sharing and building solutions openly. With this in mind, we have open-sourced the AEP tooling and are encouraging collaboration within the community. We will continue to iterate on our AEP, providing regular updates and supplementing it with new functionality, whilst enabling you to be directly involved with future versions.

If you would like to contribute to the AEP, you can read our contribution guide found within the repository readme.

About the author

Joshua Knight
Platform Technical Architect ·