Some checks failed
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
CD - Build & Deploy / release (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
CI/CD Improvements (.woodpecker.yml): - Add build_args for VERSION, BUILD_DATE, PYTHON_VERSION, NODE_VERSION - Add OCI labels for better image metadata - Enable cache_from for faster builds - Enable provenance for supply chain security Configuration Improvements (rxconfig.py): - Make API_URL configurable via environment (was hardcoded localhost) - Make ports configurable via FRONTEND_PORT, BACKEND_PORT env vars - Make DATABASE_URL configurable via environment - Support both development (SQLite) and production (PostgreSQL) setups Benefits: - Better CI cache utilization - Proper image versioning and metadata - Easier deployment to different environments - No code changes needed for prod vs dev
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
# Peikarband Platform - Woodpecker CI/CD Pipeline
|
|
# Harbor Registry: hub.peikarband.ir
|
|
# Best Practices Applied
|
|
|
|
steps:
|
|
build-and-push:
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
registry: hub.peikarband.ir
|
|
repo: hub.peikarband.ir/peikarband/landing
|
|
username:
|
|
from_secret: harbor_username
|
|
password:
|
|
from_secret: harbor_password
|
|
tags:
|
|
- latest
|
|
- ${CI_COMMIT_SHA:0:8}
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
platforms: linux/amd64
|
|
# Build arguments for Dockerfile
|
|
build_args:
|
|
- VERSION=${CI_COMMIT_SHA:0:8}
|
|
- BUILD_DATE=${CI_PIPELINE_CREATED}
|
|
- PYTHON_VERSION=3.11
|
|
- NODE_VERSION=20
|
|
# OCI labels for better metadata
|
|
labels:
|
|
- org.opencontainers.image.created=${CI_PIPELINE_CREATED}
|
|
- org.opencontainers.image.source=${CI_REPO_LINK}
|
|
- org.opencontainers.image.url=${CI_REPO_LINK}
|
|
- org.opencontainers.image.revision=${CI_COMMIT_SHA}
|
|
- org.opencontainers.image.version=${CI_COMMIT_SHA:0:8}
|
|
- org.opencontainers.image.title=Peikarband Landing
|
|
- org.opencontainers.image.description=Peikarband hosting platform landing page
|
|
# Cache optimization
|
|
cache: true
|
|
cache_from: hub.peikarband.ir/peikarband/landing:latest
|
|
# Security & provenance
|
|
provenance: true
|
|
insecure: false
|
|
when:
|
|
event: [push, tag, manual]
|