fix: resolve OOD_IMAGE_ID variable conflicts and production pipeline failures (ref !246)
This PR introduces logging and diagnostic checks to the deploy_feature_a and deploy_feature_b jobs. Recent pipeline runs suggested that environment variables (specifically BUILT_OOD_IMAGE_ID) or artifacts were not being passed correctly between stages.
In the development environment, the pipeline appeared functional because required variables were manually provided or injected into the environment. However, in the production environment, the script in deploy_ood was attempting to manually set/overwrite OOD_IMAGE_ID using logic that was either redundant or incorrectly scoped.
The script was explicitly assigning OOD_IMAGE_ID="${BUILT_OOD_IMAGE_ID:-$OOD_IMAGE_ID}"
In production, this caused conflicts or resulted in empty values because the variable is already provided globally by the runner environment or previous stages.
Additional Changes
Print Environment Variables: Added printenv | sort to dump the runner environment for state verification.
API Verification: Added a GET request following the schedule variable update (POST) to verify that the remote state was actually modified. Removed the
Workflow
build_ood_image (builds new image)
↓
saves BUILT_OOD_IMAGE_ID to dotenv artifact
↓
deploy_feature_a / deploy_feature_b (run in parallel)
↓
receive BUILT_OOD_IMAGE_ID via dotenv injection
↓
update schedule variable OOD_IMAGE_ID via API
↓
trigger schedule to run immediately
↓
Scheduled pipeline executes with new image