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