Upgrade pipeline task templates to custom task templates

Updated at: 2024-11-28 01:40

This topic describes how to upgrade pipeline task templates to custom task templates and use Serverless Devs 3.0 to publish applications based on the upgraded task templates.

Note

If the following error is reported when you deploy applications, you can refer to this topic to proceed:

WARNING:======================

* Please check the edition field of s.yaml, you can specify it as 1.0.0 or 2.0.0.

Message: The edition field in the s.yaml file is incorrect

Note

If your application was created before November 4, 2023, the default pipeline does not support Serverless Devs 3.0. You can refer to this topic to upgrade pipeline task templates

If your application was created after November 4, 2023, the default pipeline supports Serverless Devs 3.0. You do not need to concern yourself with the upgrade.

Pipeline task templates plan-task, deploy-task, canary-task, and release-task are incompatible with the Serverless Devs 3.0 YAML specification. After you upgrade s.yaml to version 3.0, you must upgrade these pipeline task templates to custom task template before you can use Serverless Devs 3.0 to publish applications.

You can log on to the Function Compute console, find your application, click it, click the Pipeline Management tab on the page that appears, and go to the Pipeline Details section to view the pipeline configuration. Then, click Process Preview and check whether any of the preceding templates is used as instructed by the circled numbers ①, ②, ③, ④, and ⑤ in the following figure. If any of the templates is used, replace the template with serverless-runner-task.

image.png

The following items describe how to replace a template:

  • plan-task: Click Task Template, click Code Check (①), click Precheck (②), replace the template (③), and save the change (④).

image.png

  • deploy-task: Click Task Template, click Create (①), click Build and Deploy (②), replace the template (③), and save the change (④).

image.png

  • canary-task: Click Task Template, click Deploy (①), click Canary Release (②), replace the template (③), and save the change (④). Take note that canary-task must be replaced only when you proactively enable it.

image.png

  • release-task: Click Task Template, click Deploy (①), click Version Release (②), replace the template (③), and save the change (④). Take note that release-task must be replaced only when you proactively enable it.

image.png

    Feedback