Introduction to Cloud Native Build
About 316 wordsAbout 1 min
Based on the Docker ecosystem, it abstracts environments, caches, and plugins, helping developers build software in a cooler way through declarative syntax.
- Declarative: Declarative syntax, programmable and easy to share.
- Easy to manage: Managed alongside code from the same source.
- Cloud Native: Resource pooling that shields infrastructure complexity.
Declarative Build Environment
main:
push:
- docker:
image: node:20
stages:
- name: print node version
script:
- node -v
- npm install
- npm test
Declarative Build Cache
main:
push:
- docker:
image: node:20
volumes:
- /root/.npm:copy-on-write
stages:
- name: print node version
script:
- node -v
- npm install
- npm test
Docker as Task Execution Environment
main:
push:
- stages:
- name: run with node 20
image: node:20
script:
- node -v
- name: run with node 21
image: node:21
script:
- node -v
Docker Ecosystem Based Plugins
main:
push:
- stages:
- name: hello world
image: cnbcool/hello-world
On-demand Computing Resources
main:
push:
- runner:
cpus: 64
docker:
image: node:20
stages:
- name: install and test
script:
- node -v
- npm install
- npm test
Workspaces
$:
vscode:
- runner:
cpus: 64
services:
- vscode
docker:
image: node:20
volumes:
- node_modules:copy-on-write
stages:
- name: npm install
script: npm install
High Performance
CPU Freedom
Through runner.cpus
, you can declare required CPU resources on demand, up to 64 cores
.
Second-level Cloning
Based on OverlayFS
, git-clone-yyds can complete code preparation in seconds, easily supporting 100GB+
super large repositories.
Concurrent Caching
copy-on-write
enables copy-on-write for caches, eliminating concerns about cache read-write conflicts in concurrent scenarios.
main:
push:
- runner:
cpus: 64
services:
- git-clone-yyds
docker:
image: node:20
volumes:
- /root/.npm:copy-on-write
stages:
- name: print node version
script:
- node -v
- npm install
- npm test