Zuplo
Zuplo CLI

Zuplo CLI: Deploy

Deploys current Git branch of the current directory
TerminalCode
zuplo deploy --help
zuplo deploy

Common use cases

The following examples assume that you are passing in your --api-key either as an argument or through the ZUPLO_API_KEY environment variable.

Deploying your gateway

TerminalCode
# The following will use the current Git branch as the name of the environment git checkout -b my-new-branch zuplo deploy --project my-project
TerminalCode
# If you don't wish to use the current Git branch as the name of the # environment, you can specify one using --environment zuplo deploy --project my-project --environment my-env-name

Polling timeout

By default, the deploy command will poll the status of the deployment every second for 150 seconds. For most deployments this is enough time for the build and deploy process to complete. However, if you have a large project, this may not be enough time. You can increase the timeout by setting the following environment variables.

  • POLL_INTERVAL - The interval in seconds between each poll. Default is 1 second.
  • MAX_POLL_RETRIES - The maximum number of retries before the command times out. Default is 150.
TerminalCode
POLL_INTERVAL=5000 MAX_POLL_RETRIES=300 zuplo deploy

Note, that even if the CLI times out, the deployment will continue. You can check the status of the deployment in the Zuplo portal.

Examples

Deploy the current Git branch using the branch name as the environment name

TerminalCode
zuplo deploy --api-key YOUR_API_KEY

Deploy to a specific environment name instead of using the Git branch name

TerminalCode
zuplo deploy --api-key YOUR_API_KEY --environment production

Deploy to a project in a specific account

TerminalCode
zuplo deploy --api-key YOUR_API_KEY --account my-account

Use environment variable for API key

TerminalCode
ZUPLO_API_KEY=YOUR_API_KEY zuplo deploy

Create a new branch and deploy it as a new environment

TerminalCode
git checkout -b my-feature && zuplo deploy

Options

--account

The account name

TerminalCode
zuplo deploy --account <value>
Type: string

--environment

The value to use for environment name, instead of the current branch name

TerminalCode
zuplo deploy --environment <value>
Type: string

--self-hosted-endpoint

The endpoint of your self-hosted service to deploy to

TerminalCode
zuplo deploy --self-hosted-endpoint <value>
Type: string

--fetch-environments

Fetch the environments for your project from Zuplo. If this is false, then the environment will automatically be detected from the git branch.

TerminalCode
zuplo deploy --fetch-environments
Type: booleanDefault: false

Global options

The following global options are available for all commands:

Additional resources

Last modified on