Deployment installs and configures software for a target environment. Treat it as an operational design choice, not merely the final build step: identify supported models, environment assumptions, prerequisites, and security constraints before generating commands or infrastructure. section 2.2.3 section 2.2.4
Make deployment decisions explicit:
- Choose among the supported paths, such as standard JBoss deployment, OpenShift with Helm charts, or environment-specific Maven profiles. section 2.2.3
- Prefer one production-like path when possible; supporting both old and new application paths increases compatibility and operational burden. section 2.2.4
- Keep generated deployment code separate from production code when cloud-provider changes remain possible. section 6.4.4
- Constrain automation with secure defaults: use Artifact Registry rather than deprecated Container Registry, and Secret Manager rather than plain environment variables for API keys. section 6.4.4
- Validate the result through successful image builds, deployment output, revision creation, traffic routing, and an assigned service URL. section 6.4.4
Deploying a Java service to Cloud Run
A guarded workflow builds a Java application in a Docker multi-stage build, submits the image to Artifact Registry, creates a Gemini API-key secret, and deploys the service to Cloud Run with the secret mapped to GOOGLE_AI_API_KEY. The resulting revision receives traffic and exposes a service URL. section 6.4.4




























