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
Help Center/ CodeArts Pipeline/ Getting Started/ Generating a Software Package and Deploying It on a Host Through CodeArts Pipeline

Generating a Software Package and Deploying It on a Host Through CodeArts Pipeline

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

CodeArts Pipeline is a visualized and automated job scheduling platform. It needs to be used together with automated jobs of services such as CodeArts Build, CodeArts Check, CodeArts TestPlan, and CodeArts Deploy. You can orchestrate these automated jobs as needed. A single configuration triggers executions repeatedly to avoid inefficient manual operations.

In this section, we will create a pipeline to sequentially run code checks, build the software package, and deploy it on a host.

Figure 1 Basic operation process

Prerequisites

Preparations

  1. Create a project

    1. Log in to the Huawei Cloud console.
    2. Click in the upper left corner of the page and choose Developer Services > CodeArts Pipeline from the service list.
    3. Click Access Service to access the CodeArts Pipeline homepage.
    4. On the top navigation bar, click Homepage. On the displayed page, click Create Project, select Scrum, and enter a name Project01.
    5. Click OK.

    For details, see Creating a Scrum Project and a Work Item.

  2. Create a code repository and a code check task.

    1. Click the created project to access it, choose Code > Repo from the left navigation pane.
    2. Click New Repository, select Template, and select the Java Maven Demo template.
    3. Click Next and enter the repository name Repo01.

      A code check task with the same name as the code repository is automatically created. Change the task name to CheckTask01 by referring to Creating a Task.

    4. Click OK.

    For details, see Creating a Repository Using a Template.

  3. Create a build task

    1. In the left navigation pane, choose CICD > Build.
    2. Click Create Task and configure task information.
      1. Enter a name BuildTask01, select the code source Repo, select the created repository, select the default branch master, and click Next.
      2. Select the system template Maven, click OK. On the displayed Build Actions tab page, retain the default configurations.
    3. Click Save.

    For details, see Creating a Build Task.

  4. Create an application

    1. In the left navigation pane, choose Settings > General > Basic Resources, create a host cluster, and add the purchased host to the cluster.
    2. In the left navigation pane, choose CICD > Deploy.
    3. Click Create Application. On the displayed page, enter an application name DeployTask01, click Next, select Blank Template, and click OK.
    4. On the Deployment Actions tab page, add the Select Deployment Source action and configure the following information.
      • Source: Set the source to Build task
      • Environment: Click Create. On the displayed Environment Management page, click Create Environment to import the host to the environment.
      • Build task: Select the created build task.
      • Download path: Enter the deployment directory of the host. In this example, the directory is /usr/local/.
      • Retain default settings for other parameters.
    5. Click Save.

    For details, see Creating an Application with a Blank Template.

Create a pipeline

  1. Access the created project, choose CICD > Pipeline from the left navigation pane.
  2. Click Create Pipeline and configure pipeline information.

    1. Configure the following information and click Next.
      Table 1 Pipeline basic information

      Parameter

      Configuration

      Name

      Enter Pipeline01.

      Code Source

      Select Repo.

      Repository

      Select the created repository.

      Default Branch

      Select master.

    2. Select Blank Template and click OK.

  3. On the Task Orchestration page, two stages (Code Source and Stage_1) are generated by default. Click Stage to add a new stage (Stage_2).

    1. Add a code check task
      1. Click New Job under Stage_1.
      2. Click the Check type and search for the Check extension.
      3. Move the cursor to the extension, click Add, select the created code check task, and set Check Mode to Full.
      Figure 2 Adding a code check task
    2. Add a build task
      1. Click Parallel Job under Stage_1, or click under the code check job.
        NOTE:

        The code check job and build job can be in parallel or serial.

      2. Click the Build type and search for the Build extension.
      3. Move the cursor to the extension, click Add, select the created build task, and select the repository associated with the build task.
      Figure 3 Adding a build task
    3. Add an application
      1. Click Job under Stage_2.
      2. In the displayed dialog box, search for the Deploy extension.
      3. Move the cursor to the extension, click Add, select the created application, and associate it with the added build task.
      Figure 4 Adding an application

  4. After the configuration, click Save.

Executing a Pipeline

  1. Return to the pipeline list page and click in the Operation column.
  2. In the displayed dialog box, retain the default settings, and click Execute.
  3. Click the pipeline name to go to the Execution History page.
  4. Click the execution message to check pipeline execution situation in real time.

    Click a job card to view its log.

Checking the Pipeline Execution Result

  1. Click the avatar in the upper right corner.
  2. Click CodeArts Console.
  3. Click in the upper left corner and search for Elastic Cloud Server. Then, access the Elastic Cloud Server console.
  4. Locate the ECS used for deployment, click Remote Login in the Operation column.
  5. In the Other Login Modes area, select Log in using Remote Login on the management console and click Log In.
  6. Enter the username and password for purchasing the ECS. Press Enter.
  7. Enter the following command and press Enter to go to the directory /usr/local configured during application creation.

    cd /usr/local

  8. Enter the following command and press Enter to check the deployed package.

    ls -al
    Figure 5 Checking the pipeline execution result

Related Information

CodeArts Pipeline provides built-in templates for you to quickly create pipelines. For more information, see Managing Pipeline Templates.

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