Getting startedSet up the CLI
Use the CLI in CI
In a CI job, two environment variables give the server and the token to ferry.
In CI, no person is there to approve a login. You create an API token.
1 / 4
Do it
Create an API token
In the dashboard, open Server → Account → API tokens. Click New token. Give a name such as CI, and an expiry.
The dashboard shows the token one time.
Keep the token in your CI secrets
The script gets the token from the secrets. Do not write the token in the script.
Set the two variables in the script
export FERRY_SERVER=https://ferry.apps.example.com
export FERRY_TOKEN="$FERRY_API_TOKEN" # from your CI secrets
ferry deploy api --follow # exits with 1 if the deploy failsThe two variables win over the config file.
The token has full access
The token can do all that the CLI does. You can revoke it at each time under Server → Account.
A deploy hook of a service needs no token. Use it when the CI job only starts a deploy.