push ปุ๊บ build ปั๊บ

CI/CD ที่เขียน pipeline ให้เองLoha อ่าน repo แล้วเปิด merge request พร้อม .loha.yml ให้คุณ review แล้วกด merge ไฟล์นั้นเป็น config ธรรมดาใน repo ของคุณเอง

แพ็กเกจ Free ได้ 60 build minutes ต่อเดือน ไม่ต้องใช้บัตร

Add Loha pipeline!1

Loha เปิด merge request นี้loha/pipeline/3f9c… → main

.loha.yml ไฟล์ใหม่Dockerfile
1+ name: container-build
2+ on:
3+ push: { branches: [main] }
4+ pull_request: { branches: [main] }
5+ jobs:
6+ build:
7+ steps:
8+ - uses: loha/git-clone@v1
9+ - name: Test
10+ uses: loha/run-tests@v1
11+ with: { TEST_COMMAND: npm ci && npm run test }
12+ - name: Build & Push Image
13+ uses: loha/docker-build@v1
14+ with: { IMAGE: registry.example.com/team/api:${COMMIT_SHA} }
Mergemerge commit จะเริ่ม build #1
✓ Clone Repository✓ Test✓ Build & Push Image

คุณแค่ต่อ repo กับกด merge ที่เหลือ Loha เขียนให้

  1. ต่อ repo

    เลือก repo จาก Git host ที่คุณใช้

    คุณ

  2. ได้ pipeline

    Loha อ่านโค้ด แล้วเปิด merge request พร้อม .loha.yml

    Loha

  3. review แล้ว merge

    อ่านเหมือน change อื่น ๆ merge commit จะเริ่ม build แรก

    คุณ

  4. push ตามปกติ

    ทุก push ถูก test และ build แล้วส่ง image ขึ้น registry ของคุณเอง

    Loha

ทีมคุณแค่ pushที่เหลือ Loha จัดให้

ตรวจก่อนปล่อย

ทุก push ถูกตรวจหา secret ที่หลุด เพิ่มขั้นสแกน image ใน pipeline แล้วถ้าเจอช่องโหว่เกินระดับที่ตั้งไว้ release จะถูกกันไว้ แพ็กเกจ Professional ขึ้นไป sign image พร้อม SBOM ให้ด้วย

build #48 · security
✓ secret scan no leaked secrets
✗ image scan 2 critical
openssl 3.0.13 fixed in 3.0.15
libexpat 2.5.0 fixed in 2.6.3
■ release blocked (threshold high)

rerun เฉพาะที่พัง

test เวอร์ชันหนึ่งใน matrix พัง ปุ่ม “ลองใหม่เฉพาะ job ที่ล้มเหลว” จะรันเฉพาะ job นั้นใหม่ แล้วต่อด้วย job ที่รอมันอยู่ job ที่ผ่านแล้วเก็บผลเดิมไว้

build #51 · jobs
✓ lint
✓ test node 22
✗ test node 24 exit 1
ลองใหม่เฉพาะ job ที่ล้มเหลว
✓ test node 24 retried
✓ image ran after the retry

ดูก่อน push ว่าจะรันอะไร

loha plan อ่าน .loha.yml แล้วบอกทุก job, step และ image ที่ cluster จะรันสำหรับ branch นั้น รวมถึงอะไรจะถูกข้ามและเพราะอะไร โดยไม่ build จริง

$ loha plan --branch feat/login
Plan for .loha.yml on feat/login (pull_request)
build [micro 0.25 / 256Mi]
emu clone alpine/git
↳ Replaced by the staged working tree.
run Lint node:20-alpine
run Test node:20-alpine
skip Build & Push Image
↳ Condition `event == 'push'` is false for event pull_request.

สำหรับทีมใหญ่: workspace แยกสิทธิ์ owner, admin, member และ guest มี service account สำหรับงานอัตโนมัติ audit log และ build insights ของแต่ละ repo แพ็กเกจ Enterprise กำหนด limit และเงื่อนไขเองได้

ทีมใช้ Loha ทำอะไรบ้าง

ตัวอย่างการใช้งานจริง ทีละขั้น พร้อม .loha.yml ที่อยู่เบื้องหลัง

Library หรือ API ที่ต้องรองรับ Node หลายเวอร์ชัน

  1. เพิ่ม matrix ของเวอร์ชัน Node
  2. ผูก Postgres เป็น service ให้ทุก instance
  3. แต่ละเวอร์ชันรันใน workspace ของตัวเอง พร้อมกัน
  4. เวอร์ชันไหนพัง rerun แค่ตัวนั้น
.loha.yml
test:
strategy:
matrix: { node: ['22', '24'] }
services:
postgres: { image: postgres:16 }
✓ node 22 ✗ node 24 (each version reports on its own)

เข้ากับ stack ที่คุณใช้อยู่แล้ว

ใช้ repo host, registry, ฐานข้อมูล และแชตเดิมของคุณต่อได้เลย Loha เชื่อมเข้าไปให้ ไม่ต้องรื้ออะไรทิ้ง

Repo host
  • GitLab
  • GitHub
  • Gitea
  • Forgejo
Image registry
  • Docker Hub
  • Harbor
  • GHCR
  • Any OCI registry
Service ใน build
  • PostgreSQL
  • Redis
  • MySQL
  • MongoDB
ภาษาและเครื่องมือ
  • Node.js
  • Python
  • Go
  • Java
ความปลอดภัยของ build
  • Trivy
  • cosign
  • CycloneDX SBOM
การแจ้งเตือน
  • Slack
  • LINE
  • Email
  • Webhooks

เริ่มฟรี แล้วค่อยขยายเมื่อพร้อม

แพ็กเกจ
แพ็กเกจราคา
Freeลองใช้ Loha กับ 1 โปรเจกต์60 build minutes / เดือนเริ่มใช้ฟรี฿0 / เดือน
Starterแนะนำสำหรับทีมเล็กที่ปล่อยงานทุกวัน5,000 build minutes / เดือนเลือก Starter฿490 / เดือน
Professionalเครื่องใหญ่ขึ้น และ image ที่ sign แล้ว20,000 build minutes / เดือนเลือก Professional฿2,990 / เดือน
Enterpriseกำหนด limit และเงื่อนไขเองได้ไม่จำกัด build minutesติดต่อเราตามตกลง

build แรกที่ผ่าน เริ่มจากการ merge ครั้งเดียว

เริ่มใช้ฟรี

แพ็กเกจ Free ได้ 60 build minutes ต่อเดือน 1 โปรเจกต์ ใส่ credential ของ registry เพื่อ push image