Apigee "deploy ... revision failed" in CI
Apigee imported the proxy revision but the deployment to the environment failed. The bundle has a policy reference, resource, or target that the environment cannot resolve, so the revision does not go live.
What this error means
apigeecli apis deploy (or the management API) returns a deployment error naming the policy or resource, and the revision stays undeployed.
Error: deployment failed: Error in deployment for environment test.
The revision is deployed, but the deployment had errors: ...
Common causes
A policy references a missing resource
A JavaScript, XSL, or key-value map referenced by a policy is not in the bundle or environment, so deployment errors.
A target or flow misconfiguration
A broken target endpoint, route rule, or shared flow reference makes the environment reject the revision.
How to fix it
Resolve the policy or resource error
- Read the deployment error to find the failing policy or resource.
- Add the missing resource to the bundle or fix the reference.
- Re-import and re-deploy the revision.
apigeecli apis deploy --name my-proxy --org "$ORG" \
--env test --rev 7 -t "$APIGEE_TOKEN"Validate the bundle before deploy
Lint the proxy bundle so policy and resource references are checked before the environment sees the revision.
apigeelint -s apiproxy/ -f table.jsHow to prevent it
- Lint the proxy bundle in CI before importing.
- Keep referenced resources (JS, KVM, shared flows) inside the bundle or env.
- Deploy to a test environment before production.