gitdataai/lib/parsefile/ep.pipeline.yaml
2026-05-30 01:38:40 +08:00

75 lines
1.4 KiB
YAML

version: "1"
name: "container-ci"
run_on:
push:
branches:
- main
- "release/*"
tags:
- "v*"
pull_request:
branches:
- main
- "feature/*"
jobs:
test:
stage: verify
runtime:
type: container
image: "node:20-bookworm"
runner_labels:
- linux
- container
steps:
- name: "Checkout"
task: "source.checkout"
- name: "Test"
command: "pnpm test"
build:
stage: package
depends_on:
- test
runtime:
type: container
image: "node:20-bookworm"
steps:
- name: "Checkout"
task: "source.checkout"
- name: "Build"
command: "pnpm build"
- name: "Upload dist"
task: "artifact.upload"
params:
name: "dist"
paths:
- "dist/**"
image:
stage: package
depends_on:
- build
runtime:
type: container
image: "docker:27-cli"
runner_labels:
- linux
- docker
steps:
- name: "Checkout"
task: "source.checkout"
- name: "Download dist"
task: "artifact.download"
params:
name: "dist"
path: "dist"
- name: "Build image"
task: "container.build"
params:
dockerfile: "Dockerfile"
context: "."
tags:
- "registry.example.com/app:${commit.sha}"