added files
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
ci/woodpecker/manual/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
ci/woodpecker/manual/woodpecker Pipeline failed
This commit is contained in:
@@ -1,31 +1,32 @@
|
||||
# Peikarband CI/CD - Woodpecker 2.x Standard
|
||||
# Peikarband Platform - Woodpecker CI/CD Pipeline
|
||||
variables:
|
||||
- &harbor_reg "harbor.peikarband.ir"
|
||||
- &img_name "peikarband/landing"
|
||||
- &harbor_registry "harbor.peikarband.ir"
|
||||
- &image_name "peikarband/landing"
|
||||
|
||||
# فیلتر کلی برای اجرا
|
||||
when:
|
||||
event: [push, tag, manual]
|
||||
|
||||
steps:
|
||||
# مرحله ساخت تصویر
|
||||
docker-build:
|
||||
image: plugins/docker
|
||||
# این خط حیاتی است و فقط در حالت Trusted کار میکند
|
||||
privileged: true
|
||||
# مرحله ساخت با Kaniko (بدون نیاز به Privileged و تنظیمات Trusted)
|
||||
build-and-push:
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
registry: *harbor_reg
|
||||
repo: ${harbor_reg}/${img_name}
|
||||
registry: *harbor_registry
|
||||
repo: *image_name
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA:0:8}
|
||||
- ${CI_COMMIT_SHA}
|
||||
# اطلاعات لاگین به Harbor
|
||||
username:
|
||||
from_secret: harbor_username
|
||||
password:
|
||||
from_secret: harbor_password
|
||||
# استفاده از کش برای سرعت بالا
|
||||
cache_from:
|
||||
- ${harbor_reg}/${img_name}:latest
|
||||
# مسیر داکرفایل (اگر در ریشه نیست تغییر دهید)
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
when:
|
||||
event: [push, tag, manual]
|
||||
|
||||
# تنظیمات کپی کد
|
||||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git
|
||||
# حذف بخش clone دستی برای جلوگیری از Hang در Image Pulling
|
||||
# Woodpecker به صورت پیشفرض مرحله کلون را بهینه انجام میدهد
|
||||
Reference in New Issue
Block a user