Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-cli-deploy-with-rsync

pgengler1.1kMIT0.4.0

An ember-cli-deploy plugin to upload, activate and list versioned application file/s using SSH and rsync.

ember-addon, ember-cli-deploy-plugin

readme

ember-cli-deploy-with-rsync CircleCI

An ember-cli-deploy plugin to upload, activate and list versioned application file/s using rsync and SSH.


**WARNING: This plugin is only compatible with ember-cli-deploy versions >= 0.5.0**

This plugin uploads, activates and lists deployed revisions. It's mainly based on ember-cli-deploy-ssh2 with some elements from ember-cli-deploy-scp. The main difference from ember-cli-deploy-ssh2 is that this plugin will copy all files from the build, rather than just a set of named files.

Quick Start

To get up and running quickly, do the following:

$ ember install ember-cli-deploy-with-rsync
  • Place the following configuration into config/deploy.js
ENV['with-rsync'] = {
  host: 'webserver1.example.com',
  username: 'production-deployer',
  privateKeyPath: '~/.ssh/id_rsa', // optional
  port: 22, // optional
  root: '/usr/local/www/my-application' // optional
}
  • Run the pipeline
$ ember deploy

Configuration Options

host

The host name or IP address of the machine to connect to.

Default: ''

username

The username to use to open an SSH connection.

Default: ''

privateKeyPath

The path to a private key to authenticate the ssh connection.

Default: '~/.ssh/id_rsa'

passphrase

The passphrase used to decrypt the privateKey.

Default: none

port

The port to connect on.

Default: '22'

root

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()

uploadDestination

A string or a function returning the path where the application files are stored.

Default:

function(context){
  return path.join(this.readConfig('root'), 'revisions');
}

activationDestination

The path that the active version should be linked to.

Default:

function(context) {
  return path.join(this.readConfig('root'), 'active');
}

activationStrategy

How revisions are activated either by symlink or copying revision directory.

Default: "symlink"

revisionManifest

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');
}

revisionMeta

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(),
  }
}

Prerequisites

The following properties are expected to be present on the deployment context object:

The following commands require:

changelog

Change Log

[0.3.0] - 2019-03-18

  • upgrade to latest ember-cli (3.8.1) and upgrade other dependencies
  • display output from rsync command when run with --verbose argument

[0.2.0] - 2019-03-18

  • catch errors from "rsync" command instead of carrying on as though nothing went wrong
  • in general, let errors propagate up so they fail the pipeline

[0.1.1] - 2017-05-17

  • upgrade "ember-cli-deploy-plugin" to 0.2.9

[0.1.0] - 2017-05-17

  • upgrade to latest ember-cli (2.13.1)

[0.0.3] - 2017-03-18

  • use ES6 syntax

[0.0.2] - 2017-03-18

[0.0.1] - 2015-11-24