added files
Some checks failed
CD - Build & Deploy / release (push) Has been cancelled
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
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Ehsan.Asadi
2025-12-28 00:12:40 +03:30
parent 7e1bd68a30
commit 066346a63e

View File

@@ -1,42 +1,31 @@
# Peikarband CI/CD - Woodpecker 2.x Standard
variables:
- &harbor_reg "harbor.peikarband.ir"
- &img_name "peikarband/landing"
# تنظیمات کلی برای تمام مراحل
when:
event: [push, tag, manual]
steps:
# مرحله اول: گرفتن Short SHA (چون Woodpecker داخلی ندارد)
- name: prepare
image: alpine
commands:
- echo ${CI_COMMIT_SHA} | cut -c1-8 > .sha
when:
event: [push, tag, manual]
# مرحله اصلی ساخت داکر
- name: docker-build
# مرحله ساخت تصویر
docker-build:
image: plugins/docker
# این گزینه برای نسخه های جدید و امنیت کلاستر شما حیاتی است
# این خط حیاتی است و فقط در حالت Trusted کار می‌کند
privileged: true
settings:
registry: *harbor_reg
repo: ${harbor_reg}/${img_name}
# استفاده از تگ‌های امن و استاندارد
tags:
- latest
- ${CI_COMMIT_SHA}
- ${CI_COMMIT_SHA:0:8}
username:
from_secret: harbor_username
password:
from_secret: harbor_password
build_args:
- ENVIRONMENT=production
# استفاده از کش برای سرعت بالا
cache_from:
- ${harbor_reg}/${img_name}:latest
when:
event: [push, tag, manual]
# تنظیمات فضای کاری
workspace:
base: /woodpecker/src
path: workspace
# تنظیمات کپی کد
clone:
git:
image: woodpeckerci/plugin-git