From 4f2e93f7612ffa0780a7a3466c922a30e5280168 Mon Sep 17 00:00:00 2001 From: "Ehsan.Asadi" Date: Sun, 28 Dec 2025 00:05:06 +0330 Subject: [PATCH] added files --- .woodpecker.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 7e983b1..9c64850 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,43 +1,40 @@ -# Woodpecker CI Configuration for Peikarband Landing +# Woodpecker CI - Peikarband Production Pipeline + +# تعریف متغیرها با استفاده از YAML Anchors variables: - &harbor_registry 'harbor.peikarband.ir' - &image_name 'peikarband/landing' -# تنظیمات فضای کاری -workspace: - base: /woodpecker/src - path: workspace - -pipeline: - # مرحله ساخت و ارسال تصویر به Harbor +# تعریف مراحل پایپ‌لاین +steps: docker-build: image: plugins/docker settings: registry: *harbor_registry repo: ${harbor_registry}/${image_name} - # نکته: برای داشتن Short SHA در Woodpecker، پلاگین داکر - # خودش تگ‌های هوشمند را مدیریت می‌کند یا از کل SHA استفاده کنید + # استفاده از تگ‌های استاندارد برای جلوگیری از خطای Slicing tags: - - ${CI_COMMIT_SHA} - latest - - ${CI_COMMIT_BRANCH} + - ${CI_COMMIT_SHA} username: from_secret: harbor_username password: from_secret: harbor_password build_args: - ENVIRONMENT=production - # اصلاح فرمت کش به لیست cache_from: - ${harbor_registry}/${image_name}:latest - dockerfile: Dockerfile when: - event: [push, tag, manual] + - event: [push, tag, manual] -# تنظیمات کلون کردن کد +# تنظیمات کلون (اختیاری اما توصیه شده) clone: git: image: woodpeckerci/plugin-git:latest settings: depth: 50 - tags: true \ No newline at end of file + +# تنظیمات فضای کاری +workspace: + base: /woodpecker/src + path: workspace \ No newline at end of file