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:
138
.woodpecker.yml
138
.woodpecker.yml
@@ -1,137 +1,43 @@
|
|||||||
# # Peikarband Platform - Woodpecker CI/CD Pipeline
|
# Woodpecker CI Configuration for Peikarband Landing
|
||||||
# # Complete production-ready pipeline
|
|
||||||
variables:
|
variables:
|
||||||
- &harbor_registry 'harbor.peikarband.ir'
|
- &harbor_registry 'harbor.peikarband.ir'
|
||||||
- &image_name 'peikarband/landing'
|
- &image_name 'peikarband/landing'
|
||||||
|
|
||||||
when:
|
# تنظیمات فضای کاری
|
||||||
- event: [push, tag, manual]
|
workspace:
|
||||||
|
base: /woodpecker/src
|
||||||
|
path: workspace
|
||||||
|
|
||||||
steps:
|
pipeline:
|
||||||
|
# مرحله ساخت و ارسال تصویر به Harbor
|
||||||
docker-build:
|
docker-build:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: *harbor_registry
|
registry: *harbor_registry
|
||||||
repo: ${harbor_registry}/${image_name}
|
repo: ${harbor_registry}/${image_name}
|
||||||
|
# نکته: برای داشتن Short SHA در Woodpecker، پلاگین داکر
|
||||||
|
# خودش تگهای هوشمند را مدیریت میکند یا از کل SHA استفاده کنید
|
||||||
tags:
|
tags:
|
||||||
- ${CI_COMMIT_SHA:0:8}
|
- ${CI_COMMIT_SHA}
|
||||||
- latest
|
- latest
|
||||||
|
- ${CI_COMMIT_BRANCH}
|
||||||
username:
|
username:
|
||||||
from_secret: harbor_username
|
from_secret: harbor_username
|
||||||
password:
|
password:
|
||||||
from_secret: harbor_password
|
from_secret: harbor_password
|
||||||
build_args:
|
build_args:
|
||||||
- ENVIRONMENT=production
|
- ENVIRONMENT=production
|
||||||
cache_from: ${harbor_registry}/${image_name}:latest
|
# اصلاح فرمت کش به لیست
|
||||||
|
cache_from:
|
||||||
|
- ${harbor_registry}/${image_name}:latest
|
||||||
|
dockerfile: Dockerfile
|
||||||
when:
|
when:
|
||||||
event: [push, tag, manual]
|
event: [push, tag, manual]
|
||||||
# variables:
|
|
||||||
# - &harbor_registry 'harbor.peikarband.ir'
|
|
||||||
# - &image_name 'peikarband/landing'
|
|
||||||
# - &python_version '3.11'
|
|
||||||
|
|
||||||
# # Global configuration
|
# تنظیمات کلون کردن کد
|
||||||
# when:
|
clone:
|
||||||
# - evaluate: 'CI_PIPELINE_EVENT != "cron"'
|
git:
|
||||||
|
image: woodpeckerci/plugin-git:latest
|
||||||
# steps:
|
settings:
|
||||||
# # ============================================
|
depth: 50
|
||||||
# # STAGE 1: Code Quality & Linting (DISABLED)
|
tags: true
|
||||||
# # ============================================
|
|
||||||
# # lint-python:
|
|
||||||
# # image: python:${python_version}-slim
|
|
||||||
# # environment:
|
|
||||||
# # - PYTHONPATH=/woodpecker/src/workspace
|
|
||||||
# # commands:
|
|
||||||
# # - pip install --no-cache-dir flake8 black isort mypy
|
|
||||||
# # - flake8 src/ --max-line-length=120 --exclude=__pycache__,migrations --statistics
|
|
||||||
# # - black --check src/ --line-length=120
|
|
||||||
# # - isort --check-only src/
|
|
||||||
# # when:
|
|
||||||
# # branch: [main, develop, staging, feature/*, hotfix/*]
|
|
||||||
|
|
||||||
# # lint-yaml:
|
|
||||||
# # image: cytopia/yamllint:latest
|
|
||||||
# # commands:
|
|
||||||
# # - yamllint -c .yamllint.yml helm/ || true
|
|
||||||
# # - yamllint woodpecker.yml
|
|
||||||
# # when:
|
|
||||||
# # branch: [main, develop, staging]
|
|
||||||
|
|
||||||
# # ============================================
|
|
||||||
# # STAGE 2 & 3: Tests & Security (DISABLED)
|
|
||||||
# # ============================================
|
|
||||||
# # test-unit:
|
|
||||||
# # image: python:${python_version}-slim
|
|
||||||
# # commands:
|
|
||||||
# # - pip install --no-cache-dir -r requirements.txt
|
|
||||||
# # - pytest tests/unit/
|
|
||||||
# # when:
|
|
||||||
# # branch: [main, develop]
|
|
||||||
|
|
||||||
# # ============================================
|
|
||||||
# # STAGE 4: Docker Build & Push (ACTIVE)
|
|
||||||
# # ============================================
|
|
||||||
# docker-build:
|
|
||||||
# image: plugins/docker
|
|
||||||
# settings:
|
|
||||||
# registry: *harbor_registry
|
|
||||||
# repo: ${harbor_registry}/${image_name}
|
|
||||||
# tags:
|
|
||||||
# - ${CI_COMMIT_SHA:0:8}
|
|
||||||
# - ${CI_COMMIT_BRANCH}
|
|
||||||
# - latest
|
|
||||||
# username:
|
|
||||||
# from_secret: harbor_username
|
|
||||||
# password:
|
|
||||||
# from_secret: harbor_password
|
|
||||||
# build_args:
|
|
||||||
# - ENVIRONMENT=production
|
|
||||||
# - VERSION=${CI_COMMIT_SHA:0:8}
|
|
||||||
# cache_from:
|
|
||||||
# - ${harbor_registry}/${image_name}:latest
|
|
||||||
# dockerfile: Dockerfile
|
|
||||||
# dry_run: false
|
|
||||||
# when:
|
|
||||||
# event: [push, tag, manual]
|
|
||||||
|
|
||||||
# # ============================================
|
|
||||||
# # STAGE 5 - 11: Deployment & Notifications (DISABLED)
|
|
||||||
# # ============================================
|
|
||||||
# # deploy-staging:
|
|
||||||
# # image: argoproj/argocd:latest
|
|
||||||
# # environment:
|
|
||||||
# # ARGOCD_SERVER: { from_secret: argocd_server }
|
|
||||||
# # ARGOCD_AUTH_TOKEN: { from_secret: argocd_token }
|
|
||||||
# # commands:
|
|
||||||
# # - argocd app set peikarband-staging --helm-set image.tag=${CI_COMMIT_SHA:0:8}
|
|
||||||
# # - argocd app sync peikarband-staging
|
|
||||||
# # when:
|
|
||||||
# # branch: [develop, staging]
|
|
||||||
|
|
||||||
# # notify-telegram:
|
|
||||||
# # image: appleboy/drone-telegram:latest
|
|
||||||
# # settings:
|
|
||||||
# # token: { from_secret: telegram_bot_token }
|
|
||||||
# # to: { from_secret: telegram_chat_id }
|
|
||||||
# # when:
|
|
||||||
# # status: [success, failure]
|
|
||||||
|
|
||||||
# # ============================================
|
|
||||||
# # Services & Workspace Configuration
|
|
||||||
# # ============================================
|
|
||||||
# # (سرویسها فعلاً کامنت شدند چون تستی اجرا نمیشود)
|
|
||||||
# # services:
|
|
||||||
# # postgres:
|
|
||||||
# # image: postgres:14-alpine
|
|
||||||
|
|
||||||
# workspace:
|
|
||||||
# base: /woodpecker/src
|
|
||||||
# path: workspace
|
|
||||||
|
|
||||||
# clone:
|
|
||||||
# git:
|
|
||||||
# image: woodpeckerci/plugin-git:latest
|
|
||||||
# settings:
|
|
||||||
# depth: 50
|
|
||||||
# tags: true
|
|
||||||
Reference in New Issue
Block a user