docs: archive entra materials and simplify deployment docs
This commit is contained in:
@@ -46,19 +46,15 @@ done
|
||||
|
||||
log_success "Backend services built"
|
||||
|
||||
# 6.4 Create Docker Images
|
||||
log_step "6.4 Creating Docker images..."
|
||||
# 6.4 Create local Docker images
|
||||
log_step "6.4 Creating local Docker images..."
|
||||
|
||||
# Check if Docker is running
|
||||
if ! docker info &> /dev/null; then
|
||||
error_exit "Docker is not running"
|
||||
fi
|
||||
|
||||
# Login to ACR
|
||||
log_info "Logging into Azure Container Registry..."
|
||||
az acr login --name "${ACR_NAME}" || error_exit "Failed to login to ACR"
|
||||
|
||||
# Build and push service images
|
||||
# Build service images
|
||||
for service in "${SERVICES[@]}"; do
|
||||
DOCKERFILE="${PROJECT_ROOT}/services/${service}/Dockerfile"
|
||||
|
||||
@@ -68,8 +64,8 @@ for service in "${SERVICES[@]}"; do
|
||||
continue
|
||||
fi
|
||||
|
||||
IMAGE_NAME="${ACR_NAME}.azurecr.io/${service}:${IMAGE_TAG}"
|
||||
IMAGE_NAME_SHA="${ACR_NAME}.azurecr.io/${service}:$(git rev-parse --short HEAD 2>/dev/null || echo 'latest')"
|
||||
IMAGE_NAME="${IMAGE_REGISTRY}/${service}:${IMAGE_TAG}"
|
||||
IMAGE_NAME_SHA="${IMAGE_REGISTRY}/${service}:$(git rev-parse --short HEAD 2>/dev/null || echo 'latest')"
|
||||
|
||||
log_info "Building ${service} image..."
|
||||
docker build -t "${IMAGE_NAME}" \
|
||||
@@ -77,14 +73,10 @@ for service in "${SERVICES[@]}"; do
|
||||
-f "${DOCKERFILE}" \
|
||||
"${PROJECT_ROOT}" || error_exit "Failed to build ${service} image"
|
||||
|
||||
log_info "Pushing ${service} image..."
|
||||
docker push "${IMAGE_NAME}" || error_exit "Failed to push ${service} image"
|
||||
docker push "${IMAGE_NAME_SHA}" || log_warning "Failed to push ${service} SHA image"
|
||||
|
||||
log_success "${service} image built and pushed"
|
||||
log_success "${service} image built locally"
|
||||
done
|
||||
|
||||
# Build and push app images
|
||||
# Build app images
|
||||
for app in "${APPS[@]}"; do
|
||||
DOCKERFILE="${PROJECT_ROOT}/apps/${app}/Dockerfile"
|
||||
|
||||
@@ -94,8 +86,8 @@ for app in "${APPS[@]}"; do
|
||||
continue
|
||||
fi
|
||||
|
||||
IMAGE_NAME="${ACR_NAME}.azurecr.io/${app}:${IMAGE_TAG}"
|
||||
IMAGE_NAME_SHA="${ACR_NAME}.azurecr.io/${app}:$(git rev-parse --short HEAD 2>/dev/null || echo 'latest')"
|
||||
IMAGE_NAME="${IMAGE_REGISTRY}/${app}:${IMAGE_TAG}"
|
||||
IMAGE_NAME_SHA="${IMAGE_REGISTRY}/${app}:$(git rev-parse --short HEAD 2>/dev/null || echo 'latest')"
|
||||
|
||||
log_info "Building ${app} image..."
|
||||
docker build -t "${IMAGE_NAME}" \
|
||||
@@ -103,11 +95,7 @@ for app in "${APPS[@]}"; do
|
||||
-f "${DOCKERFILE}" \
|
||||
"${PROJECT_ROOT}" || error_exit "Failed to build ${app} image"
|
||||
|
||||
log_info "Pushing ${app} image..."
|
||||
docker push "${IMAGE_NAME}" || error_exit "Failed to push ${app} image"
|
||||
docker push "${IMAGE_NAME_SHA}" || log_warning "Failed to push ${app} SHA image"
|
||||
|
||||
log_success "${app} image built and pushed"
|
||||
log_success "${app} image built locally"
|
||||
done
|
||||
|
||||
# Sign images with Cosign (if available)
|
||||
@@ -115,13 +103,13 @@ if command -v cosign &> /dev/null; then
|
||||
log_step "6.5 Signing images with Cosign..."
|
||||
|
||||
for service in "${SERVICES[@]}"; do
|
||||
IMAGE_NAME="${ACR_NAME}.azurecr.io/${service}:${IMAGE_TAG}"
|
||||
IMAGE_NAME="${IMAGE_REGISTRY}/${service}:${IMAGE_TAG}"
|
||||
log_info "Signing ${service} image..."
|
||||
cosign sign --yes "${IMAGE_NAME}" || log_warning "Failed to sign ${service} image"
|
||||
done
|
||||
|
||||
for app in "${APPS[@]}"; do
|
||||
IMAGE_NAME="${ACR_NAME}.azurecr.io/${app}:${IMAGE_TAG}"
|
||||
IMAGE_NAME="${IMAGE_REGISTRY}/${app}:${IMAGE_TAG}"
|
||||
log_info "Signing ${app} image..."
|
||||
cosign sign --yes "${IMAGE_NAME}" || log_warning "Failed to sign ${app} image"
|
||||
done
|
||||
@@ -131,10 +119,13 @@ else
|
||||
log_warning "Cosign not found, skipping image signing"
|
||||
fi
|
||||
|
||||
log_step "6.5 Preparing Phoenix deployment artifact..."
|
||||
bash "${SCRIPT_DIR}/sync-portal-public-to-sankofa-phoenix.sh" --dry-run --skip-build \
|
||||
|| log_warning "Phoenix artifact preview failed"
|
||||
|
||||
# Save state
|
||||
save_state "phase6" "complete"
|
||||
|
||||
log_success "=========================================="
|
||||
log_success "Phase 6: Build & Package - COMPLETE"
|
||||
log_success "=========================================="
|
||||
|
||||
|
||||
Reference in New Issue
Block a user