All Products
Search
Document Center

Function Compute (2.0):Use the fc-release plug-in to release an official version

Last Updated:Oct 30, 2023

After a function version passes the canary release and runs as expected, you can set it as the main version of an alias and release it as an official version. This topic describes how to use the fc-release plug-in to release an official version.

Use the fc-release plug-in

If you want to use the fc-release plug-in to release an official version, you must use the fc-canary plug-in to perform canary release first. This plug-in sets the main version of the alias to the canary release version and removes the canary release configuration. If the alias does not exist, the plug-in creates a new alias and updates the version number to the latest version. If the alias is not in the canary release state, the system creates an alias based on the latest version.

In Function Compute V2.0, aliases are configured at the service level. The following sample code provides an example on how to use the plug-in.

# Update the alias configurations of the web-framework-kzbp service in the China (Hangzhou) region and release an official version. 
- plugin: @serverless-cd/fc-release
  inputs:
    serviceName: web-framework-kzbp
    aliasName: prod
    regionId: cn-hangzhou