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
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
This commit is contained in:
@@ -1,18 +1,29 @@
|
||||
# Woodpecker CI - Peikarband Production Pipeline
|
||||
|
||||
# تعریف متغیرها با استفاده از YAML Anchors
|
||||
variables:
|
||||
- &harbor_registry 'harbor.peikarband.ir'
|
||||
- &image_name 'peikarband/landing'
|
||||
- &harbor_reg "harbor.peikarband.ir"
|
||||
- &img_name "peikarband/landing"
|
||||
|
||||
# تنظیمات کلی برای تمام مراحل
|
||||
when:
|
||||
event: [push, tag, manual]
|
||||
|
||||
# تعریف مراحل پایپلاین
|
||||
steps:
|
||||
docker-build:
|
||||
# مرحله اول: گرفتن Short SHA (چون Woodpecker داخلی ندارد)
|
||||
- name: prepare
|
||||
image: alpine
|
||||
commands:
|
||||
- echo ${CI_COMMIT_SHA} | cut -c1-8 > .sha
|
||||
when:
|
||||
event: [push, tag, manual]
|
||||
|
||||
# مرحله اصلی ساخت داکر
|
||||
- name: docker-build
|
||||
image: plugins/docker
|
||||
# این گزینه برای نسخه های جدید و امنیت کلاستر شما حیاتی است
|
||||
privileged: true
|
||||
settings:
|
||||
registry: *harbor_registry
|
||||
repo: ${harbor_registry}/${image_name}
|
||||
# استفاده از تگهای استاندارد برای جلوگیری از خطای Slicing
|
||||
registry: *harbor_reg
|
||||
repo: ${harbor_reg}/${img_name}
|
||||
# استفاده از تگهای امن و استاندارد
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA}
|
||||
@@ -22,17 +33,9 @@ steps:
|
||||
from_secret: harbor_password
|
||||
build_args:
|
||||
- ENVIRONMENT=production
|
||||
cache_from:
|
||||
- ${harbor_registry}/${image_name}:latest
|
||||
cache_from: [*harbor_reg/peikarband/landing:latest]
|
||||
when:
|
||||
- event: [push, tag, manual]
|
||||
|
||||
# تنظیمات کلون (اختیاری اما توصیه شده)
|
||||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git:latest
|
||||
settings:
|
||||
depth: 50
|
||||
event: [push, tag, manual]
|
||||
|
||||
# تنظیمات فضای کاری
|
||||
workspace:
|
||||
|
||||
Reference in New Issue
Block a user