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
| Stage | Description |
|---|---|
| Trigger | Git push, code package upload, template, CLI |
| Pull code | Pulls the latest commit of the linked branch |
| Build and package | Runs custom install and build scripts, with real-time build logs |
| Deploy | Runs 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
| Feature | Description |
|---|---|
| Unified entry | Detects one or more resources to deploy from the directory structure or cloudbaserc.json |
| Multiple triggers | Git repository, code package, template, CLI |
| Git authorization | Authorize GitHub, Gitee, and CNB once and reuse globally |
| Build environment | Preinstalled Node.js, Python, Go, Docker, and a logged-in CloudBase CLI, so no keys are needed. Install, build, and deploy scripts are customizable |
| Build logs | Real-time build logs in the console |
| Deployment records | Unified history: time, trigger, operator, Git commit, and result |
| Environment variables | Configured per pipeline and injected at build time |
| Pre-deploy confirmation | Shows the target type and resource list, and confirms overwrite or create |
| Auto deploy | The 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.jsonhas no field for them, and gateway routes cannot point to them. Deploy CloudBase Run withtcb cloudrun deploy, and combine it withtcb deployin 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:
| Item | hosting | app |
|---|---|---|
| Deploy command | tcb deploy | tcb app deploy, or together with tcb deploy |
| Build location | Locally or in the pipeline build environment. Run tcb app build first | Built in the cloud |
| Form in the cloud | A file directory under the Static Hosting root, named by deployPath. No app entity | An app with a name, version records, and its own access domain |
| Where to view | Console: Static Hosting → File Management | Console: Apps list |
| Referenced by gateway | Yes, target: hosting:<name> | No |
| Access URL | <environment domain>/<deployPath>/ | <app name>-<env ID>.webapps.tcloudbase.com |
Related resources
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 do | Document |
|---|---|
| Deploy for the first time and get it working end to end | Tutorial: Deploy the Sample Project |
| Create a pipeline in the console and view deployment records | Create and Manage Pipelines in the Console |
| Trigger deployments in CI/CD, scripts, or your own platform, and look up commands and API parameters | CLI and Cloud API Deployment Reference |