grunt-ssh-deploy (Version: 0.4.1)
SSH Deployment for Grunt using ssh2.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-ssh-deploy --save-dev
In your project's Gruntfile, add a section named
environments to the data object passed into
This plugin will connect to your remote host, add a directory to releases/ in your
remote_path, and create a symlink to the latest release.
The symlink by default is
current, you can change this by setting
By setting an environment, you can deploy each specific one with
grunt ssh_deploy:environment or rolling back with
Remote host to connect to.
The username to connect as on the remote server.
Password for the username on the remote server.
Path to your private key
Passphrase of your private key if needed.
Port to connect to on the remote server.
Default timeout (in milliseconds) to wait for the SSH handshake to complete.
Full path on the remote server where files will be deployed.
Path on your local for the files you want to be deployed to the remote server. No trailing slash needed.
Path to directory to symlink with most recent release.
Commands to run on the server before and after deploy directory is created and symlinked.
Default value: the current date (as a timestamp)
The release tag, e.g. '1.2.3'. It can be a string or a function (in that case is called and the returned value will be used). It defaults to the current timestamp formatted as 'YYYYMMDDHHmmssSSS'.
WARN: release tag name matters. When used with parameter
releases_to_keep the releases are reverse sorted
alphabetically and older ones are removed. So be careful when you set your release tag name.
The number of builds (including the current build) to keep in the remote releases directory. Must be >= 1.
Name of the sub directory to store the release in. Useful when multiple projects get deployed
to the same machine and the
releases_to_keep option is being used.
Name of the root directory where all the releases are published. If a
options.release_subdir is also provided then
the latest will be appended after this path.
Compress the build before uploading.
200 * 1024
Largest amount of data allowed on stdout or stderr.
List of folders or files to exclude from build.
Before and After Hooks
- 2014/06/23 - v0.2.0 - Added rollback functionality.
- 2014/06/19 - v0.1.7 - Fixed symlink method to cd into deploy_path before setting symlink.
- 2014/05/04 - v0.1.5 - Changing symlink method to not use full path.
- 2014/05/04 - v0.1.0 - Initial release.