Compare commits
2 Commits
8253fa73de
...
cf6fcd4dfe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf6fcd4dfe | ||
|
|
15e664461d |
@@ -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:"
|
||||
|
||||
Reference in New Issue
Block a user