diff --git a/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml b/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml index 54e31959..c7b83018 100644 --- a/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml +++ b/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml @@ -139,9 +139,9 @@ spec: # Update the image tag in the deployment YAML if [ -f "$MANIFEST_PATH" ]; then - # Update image reference from bakery/image_name:tag to registry/image_name:git_revision + # Update image reference from registry.bakewise.ai/bakery-admin/image_name:tag to registry/image_name:git_revision # Use a broad pattern to match any existing tag (including sha256 hashes) - sed -i "s|image: bakery/${IMAGE_NAME}:.*|image: $(params.registry)/${IMAGE_NAME}:$(params.git-revision)|g" "$MANIFEST_PATH" + sed -i "s|image: registry.bakewise.ai/bakery-admin/${IMAGE_NAME}:.*|image: $(params.registry)/${IMAGE_NAME}:$(params.git-revision)|g" "$MANIFEST_PATH" echo "Updated image in: $MANIFEST_PATH -> $(params.registry)/${IMAGE_NAME}:$(params.git-revision)" else @@ -149,6 +149,23 @@ spec: echo " Tried: $MANIFEST_PATH" echo " Service: $service, service_dir: $service_dir, IMAGE_NAME: $IMAGE_NAME" fi + + # Also update migration job if it exists + MIGRATION_JOB_PATH="infrastructure/services/microservices/$service_dir/migrations/${service_dir}-migration-job.yaml" + if [ -f "$MIGRATION_JOB_PATH" ]; then + # Update migration job image reference + sed -i "s|image: registry.bakewise.ai/bakery-admin/${IMAGE_NAME}:.*|image: $(params.registry)/${IMAGE_NAME}:$(params.git-revision)|g" "$MIGRATION_JOB_PATH" + echo "Updated migration job: $MIGRATION_JOB_PATH -> $(params.registry)/${IMAGE_NAME}:$(params.git-revision)" + else + # Try alternative migration job naming patterns + if [ -f "infrastructure/services/microservices/$service_dir/migrations/${service}-migration-job.yaml" ]; then + MIGRATION_JOB_PATH="infrastructure/services/microservices/$service_dir/migrations/${service}-migration-job.yaml" + sed -i "s|image: registry.bakewise.ai/bakery-admin/${IMAGE_NAME}:.*|image: $(params.registry)/${IMAGE_NAME}:$(params.git-revision)|g" "$MIGRATION_JOB_PATH" + echo "Updated migration job: $MIGRATION_JOB_PATH -> $(params.registry)/${IMAGE_NAME}:$(params.git-revision)" + else + echo "Info: No migration job found for $service" + fi + fi fi done diff --git a/infrastructure/services/microservices/ai-insights/migrations/ai-insights-migration-job.yaml b/infrastructure/services/microservices/ai-insights/migrations/ai-insights-migration-job.yaml index 44f7b7ed..283df93c 100644 --- a/infrastructure/services/microservices/ai-insights/migrations/ai-insights-migration-job.yaml +++ b/infrastructure/services/microservices/ai-insights/migrations/ai-insights-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/ai-insights-service + image: registry.bakewise.ai/bakery-admin/ai_insights:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "ai_insights"] env: - name: AI_INSIGHTS_DATABASE_URL diff --git a/infrastructure/services/microservices/alert-processor/migrations/alert-processor-migration-job.yaml b/infrastructure/services/microservices/alert-processor/migrations/alert-processor-migration-job.yaml index af9c0221..6caf26a7 100644 --- a/infrastructure/services/microservices/alert-processor/migrations/alert-processor-migration-job.yaml +++ b/infrastructure/services/microservices/alert-processor/migrations/alert-processor-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/alert-processor + image: registry.bakewise.ai/bakery-admin/alert_processor:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "alert_processor"] env: - name: ALERT_PROCESSOR_DATABASE_URL diff --git a/infrastructure/services/microservices/auth/migrations/auth-migration-job.yaml b/infrastructure/services/microservices/auth/migrations/auth-migration-job.yaml index ba3b2a00..79ef8d9e 100644 --- a/infrastructure/services/microservices/auth/migrations/auth-migration-job.yaml +++ b/infrastructure/services/microservices/auth/migrations/auth-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/auth-service + image: registry.bakewise.ai/bakery-admin/auth:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "auth"] env: - name: AUTH_DATABASE_URL diff --git a/infrastructure/services/microservices/demo-session/migrations/demo-session-migration-job.yaml b/infrastructure/services/microservices/demo-session/migrations/demo-session-migration-job.yaml index 0779b121..60554e00 100644 --- a/infrastructure/services/microservices/demo-session/migrations/demo-session-migration-job.yaml +++ b/infrastructure/services/microservices/demo-session/migrations/demo-session-migration-job.yaml @@ -28,7 +28,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/demo-session-service + image: registry.bakewise.ai/bakery-admin/demo_session:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "demo_session"] env: - name: DEMO_SESSION_DATABASE_URL diff --git a/infrastructure/services/microservices/distribution/migrations/distribution-migration-job.yaml b/infrastructure/services/microservices/distribution/migrations/distribution-migration-job.yaml index 9bbfad44..92be2bdc 100644 --- a/infrastructure/services/microservices/distribution/migrations/distribution-migration-job.yaml +++ b/infrastructure/services/microservices/distribution/migrations/distribution-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/distribution-service + image: registry.bakewise.ai/bakery-admin/distribution:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c imagePullPolicy: IfNotPresent command: ["python", "/app/shared/scripts/run_migrations.py", "distribution"] env: diff --git a/infrastructure/services/microservices/external/migrations/external-migration-job.yaml b/infrastructure/services/microservices/external/migrations/external-migration-job.yaml index 86538eab..c2b47b27 100644 --- a/infrastructure/services/microservices/external/migrations/external-migration-job.yaml +++ b/infrastructure/services/microservices/external/migrations/external-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/external-service + image: registry.bakewise.ai/bakery-admin/external:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "external"] env: - name: EXTERNAL_DATABASE_URL diff --git a/infrastructure/services/microservices/forecasting/migrations/forecasting-migration-job.yaml b/infrastructure/services/microservices/forecasting/migrations/forecasting-migration-job.yaml index 8e714a6d..98a0bc31 100644 --- a/infrastructure/services/microservices/forecasting/migrations/forecasting-migration-job.yaml +++ b/infrastructure/services/microservices/forecasting/migrations/forecasting-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/forecasting-service + image: registry.bakewise.ai/bakery-admin/forecasting:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "forecasting"] env: - name: FORECASTING_DATABASE_URL diff --git a/infrastructure/services/microservices/inventory/migrations/inventory-migration-job.yaml b/infrastructure/services/microservices/inventory/migrations/inventory-migration-job.yaml index ae03d9c6..d1d81378 100644 --- a/infrastructure/services/microservices/inventory/migrations/inventory-migration-job.yaml +++ b/infrastructure/services/microservices/inventory/migrations/inventory-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/inventory-service + image: registry.bakewise.ai/bakery-admin/inventory:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "inventory"] env: - name: INVENTORY_DATABASE_URL diff --git a/infrastructure/services/microservices/notification/migrations/notification-migration-job.yaml b/infrastructure/services/microservices/notification/migrations/notification-migration-job.yaml index 133ed178..b4586b6f 100644 --- a/infrastructure/services/microservices/notification/migrations/notification-migration-job.yaml +++ b/infrastructure/services/microservices/notification/migrations/notification-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/notification-service + image: registry.bakewise.ai/bakery-admin/notification:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "notification"] env: - name: NOTIFICATION_DATABASE_URL diff --git a/infrastructure/services/microservices/orchestrator/migrations/orchestrator-migration-job.yaml b/infrastructure/services/microservices/orchestrator/migrations/orchestrator-migration-job.yaml index b368a734..6002170f 100644 --- a/infrastructure/services/microservices/orchestrator/migrations/orchestrator-migration-job.yaml +++ b/infrastructure/services/microservices/orchestrator/migrations/orchestrator-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/orchestrator-service + image: registry.bakewise.ai/bakery-admin/orchestrator:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "orchestrator"] env: - name: ORCHESTRATOR_DATABASE_URL diff --git a/infrastructure/services/microservices/orders/migrations/orders-migration-job.yaml b/infrastructure/services/microservices/orders/migrations/orders-migration-job.yaml index e91f37bc..55100d76 100644 --- a/infrastructure/services/microservices/orders/migrations/orders-migration-job.yaml +++ b/infrastructure/services/microservices/orders/migrations/orders-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/orders-service + image: registry.bakewise.ai/bakery-admin/orders:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "orders"] env: - name: ORDERS_DATABASE_URL diff --git a/infrastructure/services/microservices/pos/migrations/pos-migration-job.yaml b/infrastructure/services/microservices/pos/migrations/pos-migration-job.yaml index 3e2c7bf3..cb0c6dbd 100644 --- a/infrastructure/services/microservices/pos/migrations/pos-migration-job.yaml +++ b/infrastructure/services/microservices/pos/migrations/pos-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/pos-service + image: registry.bakewise.ai/bakery-admin/pos:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "pos"] env: - name: POS_DATABASE_URL diff --git a/infrastructure/services/microservices/procurement/migrations/procurement-migration-job.yaml b/infrastructure/services/microservices/procurement/migrations/procurement-migration-job.yaml index b5f84a5b..ce19f5fd 100644 --- a/infrastructure/services/microservices/procurement/migrations/procurement-migration-job.yaml +++ b/infrastructure/services/microservices/procurement/migrations/procurement-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/procurement-service + image: registry.bakewise.ai/bakery-admin/procurement:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "procurement"] env: - name: PROCUREMENT_DATABASE_URL diff --git a/infrastructure/services/microservices/production/migrations/production-migration-job.yaml b/infrastructure/services/microservices/production/migrations/production-migration-job.yaml index 76b142d2..a9bff1ae 100644 --- a/infrastructure/services/microservices/production/migrations/production-migration-job.yaml +++ b/infrastructure/services/microservices/production/migrations/production-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/production-service + image: registry.bakewise.ai/bakery-admin/production:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "production"] env: - name: PRODUCTION_DATABASE_URL diff --git a/infrastructure/services/microservices/recipes/migrations/recipes-migration-job.yaml b/infrastructure/services/microservices/recipes/migrations/recipes-migration-job.yaml index 367bba70..8cc8c500 100644 --- a/infrastructure/services/microservices/recipes/migrations/recipes-migration-job.yaml +++ b/infrastructure/services/microservices/recipes/migrations/recipes-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/recipes-service + image: registry.bakewise.ai/bakery-admin/recipes:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "recipes"] env: - name: RECIPES_DATABASE_URL diff --git a/infrastructure/services/microservices/sales/migrations/sales-migration-job.yaml b/infrastructure/services/microservices/sales/migrations/sales-migration-job.yaml index 39b548e6..f625e9df 100644 --- a/infrastructure/services/microservices/sales/migrations/sales-migration-job.yaml +++ b/infrastructure/services/microservices/sales/migrations/sales-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/sales-service + image: registry.bakewise.ai/bakery-admin/sales:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "sales"] env: - name: SALES_DATABASE_URL diff --git a/infrastructure/services/microservices/suppliers/migrations/suppliers-migration-job.yaml b/infrastructure/services/microservices/suppliers/migrations/suppliers-migration-job.yaml index d06ba66b..d19dc27f 100644 --- a/infrastructure/services/microservices/suppliers/migrations/suppliers-migration-job.yaml +++ b/infrastructure/services/microservices/suppliers/migrations/suppliers-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/suppliers-service + image: registry.bakewise.ai/bakery-admin/suppliers:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "suppliers"] env: - name: SUPPLIERS_DATABASE_URL diff --git a/infrastructure/services/microservices/tenant/migrations/tenant-migration-job.yaml b/infrastructure/services/microservices/tenant/migrations/tenant-migration-job.yaml index e6207c59..c4e5d0f8 100644 --- a/infrastructure/services/microservices/tenant/migrations/tenant-migration-job.yaml +++ b/infrastructure/services/microservices/tenant/migrations/tenant-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/tenant-service + image: registry.bakewise.ai/bakery-admin/tenant:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "tenant"] env: - name: TENANT_DATABASE_URL diff --git a/infrastructure/services/microservices/training/migrations/training-migration-job.yaml b/infrastructure/services/microservices/training/migrations/training-migration-job.yaml index 99dfd4a8..3feaf43c 100644 --- a/infrastructure/services/microservices/training/migrations/training-migration-job.yaml +++ b/infrastructure/services/microservices/training/migrations/training-migration-job.yaml @@ -29,7 +29,7 @@ spec: cpu: "100m" containers: - name: migrate - image: bakery/training-service + image: registry.bakewise.ai/bakery-admin/training:6f282eff4c253e49a5ed4e8ba8be8b1e57280f8c command: ["python", "/app/shared/scripts/run_migrations.py", "training"] env: - name: TRAINING_DATABASE_URL