43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Phase 5: Local Artifact / Runtime Preparation
|
|
# Prepare local image tags and artifact directories for the Phoenix-native deployment flow.
|
|
#
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "${SCRIPT_DIR}/config.sh"
|
|
|
|
log_info "=========================================="
|
|
log_info "Phase 5: Local Artifact / Runtime Preparation"
|
|
log_info "=========================================="
|
|
|
|
log_step "5.1 Verifying local Docker runtime..."
|
|
docker info >/dev/null || error_exit "Docker is not running"
|
|
log_success "Docker runtime available"
|
|
|
|
log_step "5.2 Preparing artifact directories..."
|
|
mkdir -p "${ARTIFACTS_DIR}/images"
|
|
log_success "Artifacts directory ready at ${ARTIFACTS_DIR}"
|
|
|
|
log_step "5.3 Recording image naming convention..."
|
|
{
|
|
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY}"
|
|
echo "IMAGE_TAG=${IMAGE_TAG}"
|
|
for service in "${SERVICES[@]}"; do
|
|
echo "${service}=${IMAGE_REGISTRY}/${service}:${IMAGE_TAG}"
|
|
done
|
|
for app in "${APPS[@]}"; do
|
|
echo "${app}=${IMAGE_REGISTRY}/${app}:${IMAGE_TAG}"
|
|
done
|
|
} > "${ARTIFACTS_DIR}/image-manifest-${ENVIRONMENT}.txt"
|
|
log_success "Image manifest written to ${ARTIFACTS_DIR}/image-manifest-${ENVIRONMENT}.txt"
|
|
|
|
# Save state
|
|
save_state "phase5" "complete"
|
|
|
|
log_success "=========================================="
|
|
log_success "Phase 5: Local Artifact / Runtime Preparation - COMPLETE"
|
|
log_success "=========================================="
|