Header

Variables

Variables in a DeployHQ project are dynamic elements based on various aspects of a deployment that can be used specifically in Config files, SSH commands and in most cases, notifications. You'll find a full list of these variables by clicking the link below your main configuration box when you're configuring either feature.

A useful example is the %environment% variable that can be added in your server's settings when you're configuring it. You might add the %environment% variable several times in a config file to match some preconfigured environment variables on the end server, such as ENV['%environment%'].

These variables refer to the project

  • %startrev% - Start revision ref
  • %endrev% - End revision ref
  • %tag% - Tag related to end revision (if present)
  • %branch% - The branch of the deployment
  • %count% - This number of deployments in the project
  • %servers% - Names of the servers in this deployment
  • %deployer% - User who started the deployment (if manually deployed)
  • %commitrange% - The start and end commit, separated with a hyphen
  • %project% - The name of this project in deploy
  • %projecturl% - The address of this project in DeployHQ
  • %projectperma% - The permalink of this project in DeployHQ
  • %deploymenturl% - The address of this deployment in DeployHQ
  • %status% - The current status of this deployment

These variables refer to a specific server

  • %environment% - Server environment (development, production etc.)
  • %username% - Username used to login to the server
  • %password% - Password used to login to the server
  • %groupindex% - The order within it's group that this server is deployed (zero-indexed)
  • %path% - Base server path we’re deploying to

These variables can be used on a server configured for zero-downtime deployments

  • %release_path% - Path that the release is being deployed to
  • %shared_path% - Path containing shared files that will by symlinked to release
  • %current_path% - Symlink pointing to the currently active release