Skip to content
Back

Gitlab function automation

  • 0
  • Self Hosted
  • Functions
f4ls3
1 Feb, 2026, 02:12

Im trying to automate my function deployment using gitlabs ci/cd pipeline. Im currently failing trying to use the appwrite cli to create a new deployment.

⁨``` appwrite functions create-deployment --function-id $FUNCTION_ID --code "." --entrypoint "dist/main.js" --commands "npm i -g typescript && npm install && tsc" --activate true

TypeScript

No matter how I change the --code parameter I cannot get this command to work even when trying to execute it myself and not in the pipeline:

```
Error: File not found in payload
    at _Client.<anonymous> (C:\Users\***\AppData\Roaming\npm\node_modules\appwrite-cli\dist\cli.cjs:110410:15)
    at Generator.next (<anonymous>)
    at C:\Users\***\AppData\Roaming\npm\node_modules\appwrite-cli\dist\cli.cjs:109848:67
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\***\AppData\Roaming\npm\node_modules\appwrite-cli\dist\cli.cjs:109830:10)
    at _Client.chunkedUpload (C:\Users\***\AppData\Roaming\npm\node_modules\appwrite-cli\dist\cli.cjs:110407:12)
    at Functions.createDeployment (C:\Users\***\AppData\Roaming\npm\node_modules\appwrite-cli\dist\cli.cjs:116010:24)
    at C:\Users\***\AppData\Roaming\npm\node_modules\appwrite-cli\dist\cli.cjs:143588:111
```
What does that error mean? Is it even related to the --code parameter?
TL;DR
Developers are trying to automate function deployment with GitLab CI/CD but are facing issues with the appwrite cli command 'appwrite functions create-deployment.' The error 'File not found in payload' is appearing, and it's unclear if it's related to the --code parameter.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more