laravel / forge-cli

The Laravel Forge CLI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deployment without SSH

nessor opened this issue · comments

Hey guys!

Our problem

We have our Laravel application in a self-hosted GitLab. Here we want to trigger the deployment via Forge in a CI job. The CI instance that runs Forge CLI needs SSH access to the server. However, this is not easily possible for us/Only associated with great effort. Nevertheless, the message "Unable to connect to remote server. Maybe run [ssh:configure] to configure an SSH key?" appears, the deployment starts and runs successfully. We just don't get any current deployment logs -which we don't need anyway.

Our idea

Now the question is, if it's useful to extended the CLI tool and introduce sth. like forge deploy mylittlepony.com --no-ssh. This command would start the deployment and then "only" checks whether the deployment has run successfully or not. Without any displayed logs.

The snag

Maybe the API of Forge has to be extended so that the current state of a deployment can be returned. But of course we do not know if this is possible at all. Currently it does not look like the API offers this functionality. (See: https://forge.laravel.com/api-documentation#deploy-now). However, we can see the status of a deployment in the UI (Deploying, Finished, Failed). So maybe the API could also provide this information?

What do you guys think about this?

Deployments via the API are asynchronous - execute and forget.

We could poll the deployment status with the API though, so that could be possible.

@nunomaduro what do you think?

We have added your suggestion to our internal backlog. Thank you.