Skip to main content

Overview

Pipeline management provides a unified path from code to production. After you connect a Git repository or upload a code package, the pipeline installs dependencies, builds the project, deploys resources, and records every deployment.

Concepts​

A pipeline binds one code source (a Git repository or a code package) to one target CloudBase environment. Deployment records and pipeline settings belong to the pipeline.

Deployment flow:

Trigger → Pull code → Build and package → Deploy to CloudBase resources
StageDescription
TriggerGit push, code package upload, template, CLI
Pull codePulls the latest commit of the linked branch
Build and packageRuns custom install and build scripts, with real-time build logs
DeployRuns the deploy command to deploy artifacts to resources such as Cloud Functions, cloud apps, Static Hosting, gateway, and CloudBase Run. Environment variables are injected at build time

The pipeline does not store deployment artifacts. Each resource manages its own artifacts. The pipeline only records the deployment source and a snapshot of the resources.

Features​

FeatureDescription
Unified entryDetects one or more resources to deploy from the directory structure or cloudbaserc.json
Multiple triggersGit repository, code package, template, CLI
Git authorizationAuthorize GitHub, Gitee, and CNB once and reuse globally
Build environmentPreinstalled Node.js, Python, Go, Docker, and a logged-in CloudBase CLI, so no keys are needed. Install, build, and deploy scripts are customizable
Build logsReal-time build logs in the console
Deployment recordsUnified history: time, trigger, operator, Git commit, and result
Environment variablesConfigured per pipeline and injected at build time
Pre-deploy confirmationShows the target type and resource list, and confirms overwrite or create
Auto deployThe switch takes effect immediately without a rebuild

Declarative deployment​

Pipelines are built on CloudBase declarative deployment. A pipeline reads the resources declared in cloudbaserc.json under the specified root directory and deploys them in one pass. Supported resources:

  • Cloud Functions
  • Cloud apps
  • Static Hosting
  • Gateway routes
  • Database migrations
  • Integrations

Before using a pipeline, initialize the configuration file in the project and confirm that cloudbaserc.json declares the resources to deploy. For field descriptions and complete examples, see Configuration file.

⚠️ CloudBase Run services are outside declarative deployment. cloudbaserc.json has no field for them, and gateway routes cannot point to them. Deploy CloudBase Run with tcb cloudrun deploy, and combine it with tcb deploy in custom steps. For the command, see Deploy CloudBase Run.

Two deployment forms of Static Hosting​

Both hosting and app in cloudbaserc.json deploy frontend artifacts to Static Hosting, but the result in the cloud differs:

Itemhostingapp
Deploy commandtcb deploytcb app deploy, or together with tcb deploy
Build locationLocally or in the pipeline build environment. Run tcb app build firstBuilt in the cloud
Form in the cloudA file directory under the Static Hosting root, named by deployPath. No app entityAn app with a name, version records, and its own access domain
Where to viewConsole: Static Hosting → File ManagementConsole: Apps list
Referenced by gatewayYes, target: hosting:<name>No
Access URL<environment domain>/<deployPath>/<app name>-<env ID>.webapps.tcloudbase.com

Related resources are parsed from the project configuration file (cloudbaserc.json). They are the resources expected for this deployment.

⚠️ The actual deployed resources are determined by the result of the deploy command and may differ from the expectation. After deployment, view the actual details in the deployment record.

Choose a document​

What you want to doDocument
Deploy for the first time and get it working end to endTutorial: Deploy the Sample Project
Create a pipeline in the console and view deployment recordsCreate and Manage Pipelines in the Console
Trigger deployments in CI/CD, scripts, or your own platform, and look up commands and API parametersCLI and Cloud API Deployment Reference