ÃÛ¶¹ÊÓƵ

Pipeline variables in Cloud Manager configuring-pipeline-variables

Your build process might rely on specific configuration variables that should not be stored in the Git repository. Or, you may need to adjust them between pipeline runs on the same branch. Cloud Manager lets you manage these settings as pipeline variables.

About pipeline variables pipeline-variables

Using Cloud Manager you can configure pipeline variables in several different ways.

Variables may be stored as either plain text or encrypted at rest. In either case, variables are made available inside the build environment as an environment variable, which can then be referenced from inside the pom.xml file or other build scripts.

Add a pipeline variable through Cloud Manager ui

Pipeline variables can be configured and managed through the Cloud Manager user interface. They help streamline pipeline management, especially when varying configurations are required across different steps.

You must have permissions to edit the pipeline to add, edit, and delete pipeline variables.

If a pipeline is running, variable management is blocked.

To add a pipeline variable through Cloud Manager:

  1. When managing your pipelines, click Ellipsis - More icon of the pipeline for which you want to create pipeline variables.

  2. From the drop-down menu, click View/Edit variables.

    View/Edit pipeline variables

  3. In the Variables Configuration dialog box, enter the details in the first row of the table.

    table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2
    Field Description
    Name

    A unique name of the configuration variable. It identifies the specific variable that is used in the pipeline. It must adhere to the following naming conventions:

    • Variables can only contain alphanumeric characters and the underscore (_).
    • The names should be all upper-case.
    • There is a limit of 200 variables per pipeline.
    • Each name must be 100 characters or less.
    • Each string variable value must be less than 2048 characters.
    • Each secretString type variable value must be 500 characters or less.
    Value The value that the variable holds.
    Step Applied

    Required. The step in the pipeline to which the variable applies:

    • Build - The variable is applied during the build process.
    • Functional testing - The variable is used during the functional testing step.
    • UI testing - The variable is used during the UI testing phase.
    Type Select if the variable is plain text or encrypted as a secret.

    Add variable

  4. Click Add.

    Add additional variables as needed.

  5. Click Save.

Edit a pipeline variable edit-ui

  1. When managing your pipelines, click Ellipsis - More icon of the pipeline for which you want to edit pipeline variables.

  2. In the drop-down menu, click View/Edit variables.

    View/Edit pipeline variables

  3. In the Variables Configuration dialog box, click Ellipsis - More icon of the variable that you want to change.

  4. In the drop-down menu, click Edit.

    Edit variable

  5. Update the value of the variable as required.

    Only the variable’s value can be changed.

  6. Do one of the following:

    • Click Apply - Checkmark icon to apply the change.
    • Click Undo icon to revert the change.
  7. Click Save.

Delete a pipeline variable delete-ui

  1. When managing your pipelines, click Ellipsis - More icon of the pipeline for which you want to delete pipeline variables.

  2. In the drop-down menu, click View/Edit variables.

    View/Edit pipeline variables

  3. In the Variables Configuration dialog box, click Ellipsis - More icon of the variable you want to remove, then click Delete.

Set pipeline variables using the Cloud Manager CLI cli

This command in the CLI (Command Line Interface) sets a variable.

$ aio cloudmanager:set-pipeline-variables PIPELINEID --variable MY_CUSTOM_VARIABLE test

This command lists variables.

$ aio cloudmanager:list-pipeline-variables PIPELINEID

When used in a Maven pom.xml file, it is often useful to link these variables to Maven properties using a syntax similar to the following example:

        <profile>
            <id>cmBuild</id>
            <activation>
                <property>
                    <name>env.CM_BUILD</name>
                </property>
            </activation>
            <properties>
                <my.custom.property>${env.MY_CUSTOM_VARIABLE}</my.custom.property>
            </properties>
        </profile>
recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab