An ember-cli-deploy plugin to upload activate and list versioned application file/s using ssh.
**WARNING: This plugin is only compatible with ember-cli-deploy versions >= 0.5.0**
This plugin uploads, activates and lists deployed revisions. It is different from other plugins as it works with multiple applicationFiles
. The primary use case is being able to keep the index.html
and manifest.appcache
files versioned and activated together.
To get up and running quickly, do the following:
-
Ensure ember-cli-deploy-build, ember-cli-deploy-revision-data and ember-cli-deploy-display-revisions) are installed and configured.
-
Install this plugin
$ ember install ember-cli-deploy-ssh2
- Place the following configuration into
config/deploy.js
ENV['ssh2'] = {
host: 'webserver1.example.com',
username: 'production-deployer',
privateKeyPath: '~/.ssh/id_rsa',
port: 22,
applicationFiles: ['index.html', 'manifest.appcache'],
root: '/usr/local/www/my-application'
}
- Run the pipeline
$ ember deploy
The host name or ip address of the machine to connet to.
Default: ''
The username to use to open a ssh connection.
Default: ''
The path to a private key to authenticate the ssh connection.
Default: '~/.ssh/id_rsa'
The passphrase used to decrypt the privateKey.
Default: none
The port to connect on.
Default: '22'
A list of files to upload to the server.
Default: ['index.html']
A function or string used to determine where to upload applicationFiles
.
Note: ```This directory will not be created it must exist on server.``
Default: '/usr/local/www/' + context.project.name()
A string or a function returning the path where the application files are stored.
Default:
function(context){
return path.join(this.readConfig('root'), 'revisions');
}
The path that the active version should be linked to.
Default:
function(context) {
return path.join(this.readConfig('root'), 'active');
}
How revisions are activated either by symlink or copying revision directory.
Default: "symlink"
A string or a function returning the path where the revision manifest is located.
Default:
function(context) {
return path.join(this.readConfig('root'), 'revisions.json');
}
A function returning a hash of meta data to include with the revision.
Default:
function(context) {
var revisionKey = this.readConfig('revisionKey');
var who = username.sync() + '@' + os.hostname();
return {
revision: revisionKey,
deployer: who,
timestamp: new Date().getTime(),
}
}
The following properties are expected to be present on the deployment context
object:
distDir
(provided by ember-cli-deploy-build)revisionData
(provided by ember-cli-deploy-revision-data)
The following commands require:
deploy:list
(provided by ember-cli-deploy-display-revisions)