Help Center> CodeArts Deploy> User Guide> Managing Parameters
Updated on 2024-05-10 GMT+08:00

Managing Parameters

This section describes how to set application parameters. By setting application parameters, you can deploy applications based on customized parameters.

Application parameters are classified into the following types:

  • Custom: Add parameters as required. Parameter types include string, enumeration, and environment.
  • Predefined: The parameter values are generated and cannot be deleted or modified.

Configuring Parameters

This section describes how to create and configure user-defined parameters in an application.

  1. Select the target application, click , and click Edit. The Deployment Actions page is displayed.
  2. Click the Parameters tab.

    The following parameters are provided.

    Basic Information

    Description

    Create Parameter

    You can click Create Parameter to add a parameter.

    Name

    Parameter name. You can change the name of a custom parameter.

    NOTE:

    The name of a custom parameter cannot be the same as that of a predefined parameter.

    Type

    Parameter types include string, enumeration, and environment.

    Default Value

    Enter or select a parameter value.

    NOTE:

    If no environment is available when you select an environment type, you need to manually create an environment.

    Private Parameter

    If a parameter is private, the system encrypts the input for storage and only decrypts the parameter when using it. Runtime Settings cannot be set.

    Runtime Settings

    If this parameter is enabled, the parameter value can be changed during application deployment and the parameter value will be reported to the application. Runtime parameters need to be entered during execution.

    Description

    Parameter description.

    Operation

    Click to delete a parameter.

  3. Click Create Parameter to add a parameter. Customize the parameter name, type (String by default), and default value as required, and set private parameters and runtime settings.

    • String

      The parameter value is a character string. You can customize the value in the Default Value column, and enable the private parameter or runtime settings.

    • Enumeration

      After you set the type to Enumeration, the enumeration dialog box is displayed for you to set Available Values. To set multiple values, click the icon. To delete a value, click .

      After the setting, select a value from the Default Value drop-down list, as shown in the following figure.

    • Environment

      Select an environment from the Default Value drop-down list. You can select an environment created in the application from the drop-down list.

      If there is no option in the drop-down list, create an environment on the Environment Management tab page. Then return to the parameter configuration page and clickto refresh the environment to the drop-down list.

  4. After modifying all information, click Save.

Using a Parameter

This section uses an example to describe how to use custom parameters.

  1. Select the target application, click , and click Edit. The Deployment Actions page is displayed.
  2. Click Parameters, create custom parameters of Environment, Enumeration, and String respectively and enable their Runtime Settings.
  3. Click Deployment Actions and reference custom parameters in the actions details.
  4. Click Save and Deploy. In the dialog box that is displayed, assign values to the parameters again.
  5. Click OK to save and deploy the application.
  1. When CodeArts Pipeline is associated with an application, parameters can be dynamically bound.
  2. When CodeArts Pipeline is running, the entered parameter values will be replaced in the application and run.
  3. After you add a task action of the deployment type to the pipeline task and select an application with Runtime Settings parameters, parameters can be dynamically configured when the pipeline is executed.