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
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
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
|
|
image: plugins/docker
|
|
# این گزینه برای نسخه های جدید و امنیت کلاستر شما حیاتی است
|
|
privileged: true
|
|
settings:
|
|
registry: *harbor_reg
|
|
repo: ${harbor_reg}/${img_name}
|
|
# استفاده از تگهای امن و استاندارد
|
|
tags:
|
|
- latest
|
|
- ${CI_COMMIT_SHA}
|
|
username:
|
|
from_secret: harbor_username
|
|
password:
|
|
from_secret: harbor_password
|
|
build_args:
|
|
- ENVIRONMENT=production
|
|
when:
|
|
event: [push, tag, manual]
|
|
|
|
# تنظیمات فضای کاری
|
|
workspace:
|
|
base: /woodpecker/src
|
|
path: workspace |