Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts Pipeline/ User Guide/ Configuring a Pipeline/ Configuring Pipeline Parameters

Configuring Pipeline Parameters

Updated on 2025-02-10 GMT+08:00

Pipeline parameters can be transferred among jobs. By configuring pipeline parameters, you can streamline data of build, deployment, and API test jobs. Parameters include:

  • Predefined Parameters: They cannot be configured, deleted, or edited.
  • Custom Parameters: You can add parameters of string, enumeration, or auto-increment type. You can create a maximum of 100 custom parameters.
  • Parameter Groups: You can associate all pipelines in the project with a parameter group. You can create a maximum of 5 parameter groups and add a maximum of 20 custom parameters to a group.
NOTE:
  • If a code source alias is set, the repository-related system parameter will be generated based on the alias. If no alias is set, the repository name is used as the alias to generate system parameters, for example, Alias_TAG indicates the repository tag name.
  • If a pipeline is associated with multiple parameter groups and parameters with the same name exist, the value of the parameter in the last associated parameter group will be used.
  • The parameter reference format is ${Parameter name}. Enter $ in the text box and the parameter list will be displayed.

Predefined Parameters

Table 1 Predefined parameters

Parameter

Description

PROJECT_ID

ID of the project to which the current pipeline belongs.

PIPELINE_ID

ID of the current pipeline.

PIPELINE_NUMBER

Pipeline number.

COMMIT_ID

The last commit ID before execution.

COMMIT_ID_SHORT

The last short commit ID before execution.

TIMESTAMP

Pipeline execution timestamp. For example, 20211222124301.

PIPELINE_TRIGGER_TYPE

Pipeline trigger type, which includes Manual, Scheduler, RollBack, and Webhook (CreateTag, Note, Issue, MR, and Push).

PIPELINE_NAME

Pipeline name.

REPO_URL

Code repository address (HTTPS).

EXECUTE_USER

The user who executes the pipeline.

EXECUTE_USER_ID

Executor ID.

EXECUTE_USER_NAME

Executor name.

EXECUTE_USER_NICKNAME

Executor alias.

PASS_CONDITIONS_LINK

Pipeline execution details link.

PIPELINE_RUN_ID

Pipeline run ID.

MERGE_ID

Merge request ID.

WEBHOOK_PAYLOAD

Webhook request payload information.

Repo01_REPOSITORY_NAME

Repository name.

Repo01_SOURCE_BRANCH

Name of the source branch for repository operations.

Repo01_TARGET_BRANCH

Name of the target branch for repository operations.

Repo01_TAG

Repository tag name.

Repo01_COMMIT_ID

The last commit ID before execution.

Repo01_COMMIT_ID_SHORT

The last short commit ID before execution.

Repo01_REPO_URL

Code repository address (HTTPS).

Configuring Custom Parameters

You can create and configure pipeline custom parameters.

  1. Access the CodeArts Pipeline homepage.
  2. On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
  3. Switch to the Parameter Configuration tab page.
  4. On the displayed page, click Create now to configure parameters. Or click Create Parameter to add new parameters.

    Table 2 Custom parameters

    Parameter

    Description

    Name

    The specified name cannot be the same as that of a predefined parameter. Enter only letters, digits, and underscores (_) with a maximum of 128 characters.

    Type

    Parameter types include String, Auto-Increment, and Enumeration.

    Default

    Default value of the parameter.

    • String: The value contains no more than 8,192 characters. It can be left blank.
    • Auto-Increment: The value contains no more than 8,192 characters. If an auto-increment parameter is referenced in a pipeline, its value (which ends with a digit) is incremented by 1 each time the pipeline runs.
    • Enumeration: Enter letters, digits, hyphens (-), underscores (_), commas (,), periods (.), and slashes (/) with a maximum of 8,192 characters.

      After you select Enumeration, the Enumeration dialog box is displayed for you to set optional values. After that, click the Default drop-down list box, select or search for a value.

    Private Parameter

    If a parameter is private, the system encrypts the parameter for storage and decrypts the parameter for usage. Private parameters are not displayed in run logs.

    Runtime Setting

    If Runtime Setting is enabled, you can change the value of the parameter during execution configuration.

    Description

    Enter a maximum of 512 characters.

    NOTE:

    Click in the Operation column to add a parameter. Click in the Operation column to delete a parameter.

  5. After the configuration, save the pipeline.

Configuring a Parameter Group

  1. Access the CodeArts Pipeline hompage through a project.
  2. Click the Parameter Groups tab and then click Create Group.
  3. On the displayed page, set parameters.

    Figure 1 Creating a parameter group
    Table 3 Parameter group description

    Basic Information

    Description

    Project

    Project to which the parameter group belongs. The project cannot be changed.

    Name

    Enter only letters, digits, and underscores (_) with a maximum of 128 characters.

    Description

    Enter a maximum of 512 characters.

    Custom parameter list

    Click Create now to create custom parameters. For details, see Configuring Custom Parameters.

  4. Click OK to create a parameter group.
  5. Go to the pipeline editing page, choose Parameter Configuration > Parameter Groups.
  6. Click Associate Now, select a parameter group, and click Confirm to associate the pipeline with the parameter group.

    • Expand the group to check parameter details.
    • Click in the Operation column to diassociate with the parameter group.
    Figure 2 Associating with a parameter group

  7. After the configuration, save the pipeline.

Using a Parameter in a Pipeline

This section describes how to configure the releaseversion parameter in a pipeline and transfer the parameter to a build job.

  1. Create a build task.
  2. On the Parameters tab page, add the releaseversion parameter, set the default value, and enable Runtime Settings.

    Figure 3 Creating a build task parameter

  3. On the Build Actions tab page, select Upload to Release Repos and set Release Version as a reference parameter. After you enter $ in the text box, a parameter list is displayed. Select the releaseversion parameter created in the previous step.

    Figure 4 Referencing a build task parameter
    NOTE:

    $ will not trigger the display of parameter groups.

  4. Save the build job.
  5. Create a pipeline using a blank template, add the Build extension and select the created build job. The parameter releaseversion is displayed.

    Figure 5 Configuring a build task parameter

  6. Move the cursor to the releaseversion parameter to set it as a pipeline parameter. Alternatively, click OK, switch to the Parameter Configuration tab page, create the pipeline parameter releaseversion, set Type to Auto-increment or String, set a default value, and enable Runtime Setting.

    Figure 6 Creating a pipeline parameter

  7. Switch back to the Task Orchestration tab page, and edit the added build job. Use $ to reference the releaseversion parameter in the build job.

    Figure 7 Referencing a pipeline parameter
    NOTE:
    • Only text parameters for which Runtime Settings is enabled will be displayed.
    • You can move the cursor to a parameter name to quickly set the parameter as a pipeline parameter.

  8. Save the information and click Save and Execute. In the displayed dialog box, you can check the parameter information.

    The parameter value is the default value specified when you added the parameter. You can change the value. If you change it, the new value will be used in the build job.

  9. Click Execute to execute the pipeline.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback