`vercel promote` does not work from cli

Current versus Expected behavior

In CI, we used to run vercel promote --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ env.VERCEL_ORG_ID }} "$DEPLOYMENT_URL" and it was working

recently, we started getting errors that fail this command

This deployment is not a production deployment and cannot be directly
promoted. A new deployment will be built using your production environment. Are
you sure you want to continue? (y/N)

Of course, in CI, we can’t respond to that. And yet, confusingly when we look at the deployments in vercel app they show as “Production”. And so we then manually promote them.

Did something change? If so, how can we control deployment promotion from the CLI appropriately.
NOTE: this may be related to the other issue I reported but it’s unclear. On our side, I don’t believe anything impacting this changed.

Hey @failingbuild! You can find more info about vercel promote in the CLI documentation, but I believe this is the most relevant part:

Deployments built for the Production environment are the typical promote target. You can promote Deployments built for the Preview environment, but you will be asked to confirm that action and will result in a new production deployment. You can bypass this prompt by using the --yes option.

I hope that helps!

Maybe we’re doing something wrong but as far as I can tell we are building this for the production environment, as noted by them being marked as Production in the vercel dashboard.

we’re just running

vercel build --prod

is there something else that we’d need for this to be considered a production target?
Here’s what it looks like in our dashboard before I have to manually promote it.

We have released a new version of CLI v37.6.0. Can you try that and let us know if you are still experiencing this issue?

1 Like