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