Manual deploy missing relevant metadata

netlify site name: perchpeek-web-dev

Hey,

In order to run our end-to-end tests from a GitHub workflow we had to start doing manual deploys from a GitHub workflow so that we know when a deployment succeeds and its ready for the tests to execute. This happens for pull requests and when merging to the production branch.

These are the deploy commands per context:

# pull request
netlify deploy --build --context deploy-preview --alias deploy-preview --dir dist --message "deploy message" --site {site id} --auth {auth token} 

# main (production branch)
netlify deploy --prod --build --context production --alias deploy-preview --dir dist --message "deploy message" --site {site id} --auth {auth token} 

These deployments are successful but we’re noticing a couple of issues:

  1. The deploy doesn’t have any metadata aside from the deploy message. The permalink, link to GitHub PR, link to GitHub commit, commit author are not there. Could we provide it somehow in the deploy command?

  2. The Production deploys are not tagged as “Production” meaning that they are not visible in the “Site Overview > Production deploys” section. They are only visible in the “Deploys page” when NO FILTER is selected. Shouldn’t these be marked as “Production”?

Site overview > Production deploys section
missing-production-deploy

Deploys page with filter=main

Deploys page with no filter

Here’s a manual Production deployment:
https://app.netlify.com/sites/perchpeek-web-dev/deploys/629f574b524b2207a5ed7be1

What does netlify deploy --trigger does exactly? CLI reference docs state that it triggers a Netlify deploy. That means we are able to instruct Netlify to check out the code, run the build and deploy? I could work with that if it doesn’t have the issues I mentioned above above AND the command only exits after the deployment finishes (so I know when to initiate the e2e tests).

Anyways, the deploy with the flag trigger seems no to be working:

netlify deploy --trigger --prod --site {site id} --auth {auth token}

I’m getting a “Error: Forbidden” message and nothing happens. Am I missing something?

Thank you for the help!

Pedro

Hey @pm-pp,

Regarding the question 1, that’s not supported. Only Git-based deploys can have Git metadata. Whenever you deploy manually, those deploys do not have a way at the moment, to show any kind of Git-related information.

Regarding 2, the production deploys in the UI are filtered from the “production branch” that you’ve set in the UI. When you have Git-based deploys, you won’t get deploys from CLI treated as Production as there’s no branch associated with those deploys.

Hey @hrishikesh,

Thank you for the reply. Those limitations around the manual deploys seem understandable.

What’s the deploy --trigger purpose? Could we use it to trigger a Git-based deploy by Netlify and still know when its finished?

hi there,

we spoke to an Engineer familiar with the CLI and this is what we heard back:

It triggers a site build remotely and then exits with this flag

let me know if this answers your question.