Until now, an app deployed from your registry followed one tag: pushing that tag again redeployed the app, and every other push was ignored. That is still the default, and two more options sit alongside it under Deploy on push in the app's General tab:
| Setting | A push to the repository |
|---|---|
| Same tag | Redeploys the app when the tag it uses is pushed again. |
| Newest image | Deploys every push, whatever the tag, and switches the app to it. |
| Off | Does nothing. You decide when the app deploys. |
Newest image fits a pipeline that tags each build with its commit SHA:
push, and the app is on that commit. If you push the same image as both
latest and a SHA, it deploys once.
Deploy from CI
Set the app to Off and deploy the exact image your pipeline just pushed:
curl -X POST \
-H "Authorization: Bearer $COSMONER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag": "sha-3f9c2a1"}' \
https://api.cosmoner.com/v1/projects/$PROJECT_ID/apps/$APP_ID/deployments
The response includes the deployment's id. Poll it until it reports ACTIVE
or ERROR, so a failed rollout fails the pipeline too. You can also deploy by
digest, or send an empty body to deploy the image behind the app's current tag
again. The details are in the API reference.
Existing apps keep the Same tag behaviour, so nothing changes unless you switch it.