Compare commits

..

2 Commits

Author SHA1 Message Date
Ehsan.Asadi
cf6fcd4dfe fix: use same repo for base image with different tag
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Solution to 413 Payload Too Large:
 Same repository: peikarband/landing
 Different tags: base, latest, {commit}

Images:
• hub.peikarband.ir/peikarband/landing:base              (base image)
• hub.peikarband.ir/peikarband/landing:latest            (app)
• hub.peikarband.ir/peikarband/landing:{commit}          (app)

No new repo creation, no permission issues!
2025-12-30 22:42:34 +03:30
Ehsan.Asadi
15e664461d fix: build base image in same repo with different tag
Before: hub.peikarband.ir/peikarband/base:latest
After:  hub.peikarband.ir/peikarband/landing:base

This solves the 413 error because:
 Same repository (no new repo creation)
 Just different tags
 No permission/quota issues

Images:
• hub.peikarband.ir/peikarband/landing:base
• hub.peikarband.ir/peikarband/landing:latest
• hub.peikarband.ir/peikarband/landing:{commit}
2025-12-30 22:41:14 +03:30

View File

@@ -2,7 +2,7 @@
# Smart pipeline with base image management
variables:
- &base_image 'hub.peikarband.ir/peikarband/base:latest'
- &base_image 'hub.peikarband.ir/peikarband/landing:base'
- &app_image 'hub.peikarband.ir/peikarband/landing'
when:
@@ -17,7 +17,7 @@ pipeline:
image: woodpeckerci/plugin-docker-buildx
settings:
registry: hub.peikarband.ir
repo: hub.peikarband.ir/peikarband/base
repo: *app_image
username:
from_secret: HARBOR_USERNAME
password:
@@ -28,12 +28,14 @@ pipeline:
platforms: linux/amd64
tags:
- latest
- python3.11-node20
- base
- base-python3.11-node20
build_args:
- PYTHON_VERSION=3.11
- NODE_VERSION=20
- BUILD_DATE=${CI_PIPELINE_CREATED}
- VERSION=${CI_COMMIT_SHA:0:8}
labels:
- org.opencontainers.image.created=${CI_PIPELINE_CREATED}
@@ -41,9 +43,9 @@ pipeline:
- org.opencontainers.image.title=Peikarband Base
- org.opencontainers.image.description=Base image with Python, Node.js, bun, and build tools
cache: inline
provenance: true
pull: true
provenance: false
sbom: false
push: true
@@ -119,8 +121,8 @@ pipeline:
# Check base image
echo "Checking base image..."
if curl -f -u "$HARBOR_USERNAME:$HARBOR_PASSWORD" \
"https://hub.peikarband.ir/v2/peikarband/base/manifests/latest" > /dev/null 2>&1; then
echo "✅ Base image: hub.peikarband.ir/peikarband/base:latest"
"https://hub.peikarband.ir/v2/peikarband/landing/manifests/base" > /dev/null 2>&1; then
echo "✅ Base image: hub.peikarband.ir/peikarband/landing:base"
else
echo "⚠️ Base image not found (this is OK if first build)"
fi
@@ -165,7 +167,7 @@ pipeline:
- echo "Commit:" "${CI_COMMIT_SHA:0:8}"
- echo ""
- echo "Images:"
- echo " • Base:" "hub.peikarband.ir/peikarband/base:latest"
- echo " • Base:" "hub.peikarband.ir/peikarband/landing:base"
- echo " • App:" "hub.peikarband.ir/peikarband/landing:${CI_COMMIT_SHA:0:8}"
- echo ""
- echo "Deploy with:"