Static Code Analysis in the Cloud

Many companies that develop software for embedded systems are either investigating cloud platforms, planning pilot projects, or actively developing software in the cloud. These companies are often attracted to public cloud providers, such as Amazon Web Services (AWS®) and Microsoft Azure®, because of competitive pricing and other advantages that cloud platforms offer, including:

  1. Agility – You can provision and deprovision resources on demand. These operations take only a few minutes, unlike on-premises data centers where resource procurement and setup can take months.
  2. Pay-as-you-go – You do not need to make any upfront investment in hardware or software resources. For most resources, your team is only charged for the time used.
  3. Ability to scale – You have a virtually unlimited ability to scale up your operations. For example, your team can add build servers to meet demand.
  4. Tools and services – You usually have access to additional services through your cloud provider such as source code control, bug tracking, content delivery, and project management that simplifies software development and delivery.
  5. Secure access from anywhere – You can configure cloud resources to provide your global team with secure and fast access, allowing them to share resources and collaborate.

Polyspace Static Code Analysis in the Cloud

Cloud providers setup their data centers to provide infrastructure resources similar to on-premises data centers, such as servers, storage, and networking hardware. These resources are usually virtualized and offered as services to customers. This is also known as infrastructure as a service (IaaS). Customers can access a cloud provider's services through the internet, and they can use these services to install and run their applications.

Installing Polyspace® products in the cloud infrastructure is not much different from installing them on-premises. Polyspace products for static code analysis can also be easily integrated with the software development processes and services offered by the cloud providers

Integrating Polyspace with Cloud Software Development Services

In addition to IaaS, most cloud providers offer software development tools, such as source code control, continuous integration, and project planning. These tools enable the rapid creation of a software development environment that supports the entire software development lifecycle from planning to software deployment.

Example: Integrating Static Code Analysis with Azure DevOps Project

There are many ways to integrate Polyspace products into an existing Azure DevOps project in Microsoft Azure cloud. Here is one example:

Diagram of DevOps Workflow Example

Diagram of DevOps Workflow Example

The DevOps project has two pipelines, the build pipeline and the release pipeline. The build pipeline is triggered as soon as you check in your source code into the Azure code repository. Once the build pipeline successfully finishes, the release pipeline is automatically triggered. The goal is to run a Polyspace Bug Finder Server™ analysis as part of the build pipeline and a Polyspace Code Prover™ analysis as part of the release pipeline. Polyspace analysis results are uploaded to Polyspace Access™ and are available for team members to review from their web browsers. Build and release pipelines automatically fail if the Polyspace results indicate they did not meet the minimum quality criteria (quality gates) set by the team.

Diagram of DevOps Pipelines

Diagram of DevOps Pipelines

To integrate Polyspace into Azure DevOps project:

  • Install and configure Polyspace Server and Access products on a virtual machine in Azure.
  • Follow the Azure instructions to register the virtual machine as a self-hosting agent.
  • Create a script to run a Polyspace analysis and upload the results to Polyspace Access. If your project has quality gates, export the results, and verify that the quality gates are met.
  • Edit the build and release pipelines to run Polyspace Bug Finder Server and Polyspace Code Prover Server™, respectively.
  • Fail the pipeline if it does not meet the minimum quality criteria.

There are many ways to install and configure Polyspace analysis in a cloud environment. Please contact us for support on deploying Polyspace in the cloud.