All Products
Search
Document Center

Function Compute (2.0):Use Function Compute to build a front-end CI/CD system

Last Updated:Feb 02, 2024

This topic describes how to use Function Compute to set up a static resource deployment service at the frontend based on an architecture with separated frontend and backend.

Background

In most cases, enterprises use GitLab to host frontend code, Jenkins to listen for webhook messages, and then publish the messages to Object Storage Service (OSS). This solution is flexible but has the following shortcomings:

  • You need to purchase a server to set up Jenkins. This incurs compute and storage fees.

  • Professional O&M personnel are required to ensure the stable operation of servers.

  • OSS SDKs are difficult to integrate.

Solution overview

This topic describes a new solution. The following figure shows the architecture of the solution.

image

Process description:

  1. When you commit code to a code repository, Function Compute detects changes in the frontend code repository.

  2. Function Compute downloads the submitted branch and uploads files to OSS.

  3. Alibaba Cloud CDN (CDN) is used to accelerate frontend resources.

Benefits

  • Serverless: You do not need to purchase servers.

  • O&M-free: You do not need to deploy and configure Jenkins.

  • Comprehensive features: Features such as log query, performance monitoring, and alerting are supported.

  • One-stop: Event-driven trigger modes are supported.

  • Low cost: You are charged based on the actual amount of resources consumed. For more information, see Billing overview.