This commit is contained in:
100
.woodpecker.yml
100
.woodpecker.yml
@@ -97,67 +97,69 @@ steps:
|
||||
- org.opencontainers.image.title=Peikarband Landing
|
||||
- org.opencontainers.image.description=Peikarband hosting platform landing page
|
||||
|
||||
cache: inline
|
||||
provenance: true
|
||||
sbom: true
|
||||
# cache: inline
|
||||
# provenance: true
|
||||
# sbom: true
|
||||
push: true
|
||||
cache_from: type=registry,ref=hub.peikarband.ir/peikarband/landing:cache
|
||||
cache_to: type=registry,ref=hub.peikarband.ir/peikarband/landing:cache,mode=max
|
||||
|
||||
when:
|
||||
event: [push, tag]
|
||||
branch: [main, develop,]
|
||||
|
||||
# ============================================
|
||||
# Verify Images
|
||||
# ============================================
|
||||
# # ============================================
|
||||
# # Verify Images
|
||||
# # ============================================
|
||||
|
||||
verify-images:
|
||||
image: alpine:latest
|
||||
commands:
|
||||
- apk add --no-cache curl
|
||||
- |
|
||||
echo "════════════════════════════════════════"
|
||||
echo " 🔍 Verifying Images in Registry"
|
||||
echo "════════════════════════════════════════"
|
||||
echo ""
|
||||
# verify-images:
|
||||
# image: alpine:latest
|
||||
# commands:
|
||||
# - apk add --no-cache curl
|
||||
# - |
|
||||
# echo "════════════════════════════════════════"
|
||||
# echo " 🔍 Verifying Images in Registry"
|
||||
# echo "════════════════════════════════════════"
|
||||
# echo ""
|
||||
|
||||
# Check base image
|
||||
echo "Checking base image..."
|
||||
if curl -f -u "$HARBOR_USERNAME:$HARBOR_PASSWORD" \
|
||||
"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
|
||||
# # Check base image
|
||||
# echo "Checking base image..."
|
||||
# if curl -f -u "$HARBOR_USERNAME:$HARBOR_PASSWORD" \
|
||||
# "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
|
||||
|
||||
echo ""
|
||||
# echo ""
|
||||
|
||||
# Check app image
|
||||
echo "Checking app image..."
|
||||
TAG="${CI_COMMIT_SHA:0:8}"
|
||||
if curl -f -u "$HARBOR_USERNAME:$HARBOR_PASSWORD" \
|
||||
"https://hub.peikarband.ir/v2/peikarband/landing/manifests/$TAG" > /dev/null 2>&1; then
|
||||
echo "✅ App image: hub.peikarband.ir/peikarband/landing:$TAG"
|
||||
echo ""
|
||||
echo "Available tags:"
|
||||
echo " • latest"
|
||||
echo " • ${CI_COMMIT_SHA:0:8}"
|
||||
echo " • ${CI_COMMIT_BRANCH}"
|
||||
echo ""
|
||||
echo "════════════════════════════════════════"
|
||||
else
|
||||
echo "❌ Failed to verify app image"
|
||||
exit 1
|
||||
fi
|
||||
# # Check app image
|
||||
# echo "Checking app image..."
|
||||
# TAG="${CI_COMMIT_SHA:0:8}"
|
||||
# if curl -f -u "$HARBOR_USERNAME:$HARBOR_PASSWORD" \
|
||||
# "https://hub.peikarband.ir/v2/peikarband/landing/manifests/$TAG" > /dev/null 2>&1; then
|
||||
# echo "✅ App image: hub.peikarband.ir/peikarband/landing:$TAG"
|
||||
# echo ""
|
||||
# echo "Available tags:"
|
||||
# echo " • latest"
|
||||
# echo " • ${CI_COMMIT_SHA:0:8}"
|
||||
# echo " • ${CI_COMMIT_BRANCH}"
|
||||
# echo ""
|
||||
# echo "════════════════════════════════════════"
|
||||
# else
|
||||
# echo "❌ Failed to verify app image"
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
environment:
|
||||
HARBOR_USERNAME:
|
||||
from_secret: HARBOR_USERNAME
|
||||
HARBOR_PASSWORD:
|
||||
from_secret: HARBOR_PASSWORD
|
||||
# environment:
|
||||
# HARBOR_USERNAME:
|
||||
# from_secret: HARBOR_USERNAME
|
||||
# HARBOR_PASSWORD:
|
||||
# from_secret: HARBOR_PASSWORD
|
||||
|
||||
when:
|
||||
event: [push, tag]
|
||||
branch: [main, develop]
|
||||
# when:
|
||||
# event: [push, tag]
|
||||
# branch: [main, develop]
|
||||
|
||||
# ============================================
|
||||
# Notifications
|
||||
|
||||
Reference in New Issue
Block a user