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
Managed Threat Detection
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

Step 8: Configuring a Pipeline for Continuous Delivery

Updated on 2024-11-18 GMT+08:00

CodeArts Pipeline provides a visualized and customizable software pipeline for automatic delivery. It supports multiple task types, such as code check, build, and deployment tasks.

As the project progresses, each stage (build, release, and deployment) becomes more and more standardized. However, each stage is relatively independent and incomplete and cannot deliver business value directly. Only by effectively connecting each stage to form a complete continuous delivery pipeline can we truly improve the efficiency and quality of software release and continuously create business value.

This section describes how Chris, a developer, connects code check, build, and deployment for continuous delivery.

Introduction to Preset Pipelines

There are five pipeline tasks preset in the sample project. You can view and use them as needed.

Table 1 Preset pipeline tasks

Preset Pipeline Task

Description

phoenix-workflow

A basic pipeline task

phoenix-workflow-test

Pipeline task corresponding to the test environment

phoenix-workflow-work

Pipeline task corresponding to the Worker function

phoenix-workflow-result

Pipeline task corresponding to the Result function

phoenix-workflow-vote

Pipeline task corresponding to the Vote function

Configuring and Executing a Pipeline

A pipeline usually consists of multiple stages. You can add multiple jobs to each stage.

  1. Configure a pipeline.

    1. Go to the Phoenix Mall project and choose CICD > Pipeline.
    2. Find pipeline phoenix-workflow. Click and choose Edit.
    3. Add a code check stage.
      1. Click between Code Source and Build to add a stage.
      2. Click next to Stage_1. In the Edit Stage window, enter the stage name Check and click Confirm.
        Figure 1 Editing the stage name
      3. Click Job.

        In the New Job window, click Add next to the Check extension.

      4. Select the phoenix-codecheck-worker task and click OK.
        NOTE:

        The check task has three modes. This procedure uses the default mode Full. You can change the mode as required.

        • Full: All files in the code repository are scanned.
        • Incremental (last commit): Incremental check is performed based on the latest commit file.
        • Incremental (last success): Incremental check is performed based on the changed files since the latest access control was passed.
    4. Configure a deployment task.

      Click the deployment task name, select the associated build task phoenix-sample-ci, and check the values of configuration items.

      • The configurations of task phoenix-sample-standalone must be the same as those on the Parameters page of the task with the same name in CodeArts Deploy.
      • The configurations of task phoenix-cd-cce must be the same as those on the Parameters page of the task with the same name in CodeArts Deploy.
      NOTE:

      Two deployment tasks are added in this example. If you selected only one deployment mode in preceding steps, keep the corresponding task and delete the other one.

    5. Click Save.

  2. Go to the CCE console if you have configured deployment task phoenix-cd-cce in 1. Locate the target cluster and click its name to go to the Overview page.

    Choose Workloads from the navigation pane, click the Deployments tab, and verify that no record exists in the list.

    If there are records in the list, select all records, click Delete, select all options, and click Yes to clear the records in the list.

  3. Return to the pipeline list page. Click in the row where phoenix-workflow is located, and click Execute in the window that is displayed to start the pipeline.

    If is displayed, the task is successfully executed.

    If the task fails to be executed, check the failure cause in the failed task. You can open the step details page to view the task logs and rectify the faults based on the logs.

Configuring Pass Conditions

To control the code quality, the code must be scanned and the number of errors must be within a reasonable range before being released. By adding quality gates, you can effectively automate the control process.

  1. On the details page of pipeline task phoenix-workflow, click Edit.
  2. In the Check stage, click Pass Conditions.
  3. In the Pass Conditions dialog box, click Add next to Pass-Conditions-of-Standard-Policies.
  4. Select SystemPolicy and click OK.
  5. Click Save and Execute.

    If the number of check issues does not meet the pass condition, the pipeline task fails to be executed.

Configuring Code Changes to Automatically Trigger a Pipeline

Through the following configuration, code changes can automatically trigger pipeline execution, implementing continuous project delivery.

  1. On the details page of pipeline task phoenix-workflow, click Edit.
  2. Click the Execution Plan tab, select Code commit, select master from the Filter Branch drop-down list box, and click Save.
  3. Modify the code and push it to the master branch to check whether the pipeline task is automatically executed.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback