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:
|
variables:
|
||||||
- &harbor_registry 'harbor.peikarband.ir'
|
- &harbor_reg "harbor.peikarband.ir"
|
||||||
- &image_name 'peikarband/landing'
|
- &img_name "peikarband/landing"
|
||||||
|
|
||||||
|
# تنظیمات کلی برای تمام مراحل
|
||||||
|
when:
|
||||||
|
event: [push, tag, manual]
|
||||||
|
|
||||||
# تعریف مراحل پایپلاین
|
|
||||||
steps:
|
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
|
image: plugins/docker
|
||||||
|
# این گزینه برای نسخه های جدید و امنیت کلاستر شما حیاتی است
|
||||||
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
registry: *harbor_registry
|
registry: *harbor_reg
|
||||||
repo: ${harbor_registry}/${image_name}
|
repo: ${harbor_reg}/${img_name}
|
||||||
# استفاده از تگهای استاندارد برای جلوگیری از خطای Slicing
|
# استفاده از تگهای امن و استاندارد
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- ${CI_COMMIT_SHA}
|
- ${CI_COMMIT_SHA}
|
||||||
@@ -22,17 +33,9 @@ steps:
|
|||||||
from_secret: harbor_password
|
from_secret: harbor_password
|
||||||
build_args:
|
build_args:
|
||||||
- ENVIRONMENT=production
|
- ENVIRONMENT=production
|
||||||
cache_from:
|
cache_from: [*harbor_reg/peikarband/landing:latest]
|
||||||
- ${harbor_registry}/${image_name}:latest
|
|
||||||
when:
|
when:
|
||||||
- event: [push, tag, manual]
|
event: [push, tag, manual]
|
||||||
|
|
||||||
# تنظیمات کلون (اختیاری اما توصیه شده)
|
|
||||||
clone:
|
|
||||||
git:
|
|
||||||
image: woodpeckerci/plugin-git:latest
|
|
||||||
settings:
|
|
||||||
depth: 50
|
|
||||||
|
|
||||||
# تنظیمات فضای کاری
|
# تنظیمات فضای کاری
|
||||||
workspace:
|
workspace:
|
||||||
|
|||||||
Reference in New Issue
Block a user