Updated on 2024-05-08 GMT+08:00

Using a Custom Extension

This section describes how to develop a log printing extension.

Step 1: Register a Custom Extension

  1. Log in to the CodeArts homepage.
  2. Choose Services > Extensions from the top navigation bar.
  3. Click .
  4. Configure the extension information by referring to Registering an Extension.
    1. The following uses the Single-line Text Box widget as an example and changes its unique ID to input.

    2. In the extension orchestration step, use the log printing as an example to output the widget input configured on the low-code user interface and the system parameters for pipeline run. Enter the following commands in the shell command box:
      echo ======== begin ========
      # Enter the service logic of the extension.
      # Use environment variables to obtain the widget input on the low-code user interface.
      echo ${input}
      # Use environment variables to obtain system parameters for pipeline run.
      echo ${PIPELINE_ID}
      echo ======== end ==========
  5. Release the extension.

    After the configuration, click Release or Release Draft. Drafts can be deleted.

Step 2: Execute the Custom Extension

  1. Configure the custom extension for a pipeline.

    Create or edit a pipeline, add the released custom extension, and enter Low-code input in the single-line text box.

  2. Execute the pipeline.

    After the execution is complete, click the extension name to view the extension log, which contains Low-code input and pipeline system variables.