Shipit deployment tasks for ContactLab UI applications.
Inspired by shipit-deploy.
Features:
- deploy local
dist
directory to remote servers; - easy rollback.
$ npm install -D @contactlab/shipit-clab-deploy
Or
$ yarn add -D @contactlab/shipit-clab-deploy
const path = require('path');
const clabDeploy = require('@contactlab/shipit-clab-deploy');
module.exports = shipit => {
clabDeploy(shipit);
shipit.initConfig({
staging: {
servers: 'user@myserver.com',
from: path.resolve('.', 'dist'),
deployTo: '/var/www/html',
releasesDir: 'releases',
currentDir: 'current',
keepReleases: 10
}
});
};
To deploy on staging (in the /var/www/html
directory), you must use the following command:
$ shipit staging deploy
You can rollback to the previous releases with the command:
$ shipit staging rollback
Default: dist
Define the path of the directory which will be deployed.
Required
Define the remote path where the from
directory will be deployed. A new directory for the specific release is created under releasesDir
folder and is sym-linked to currentDir
.
Default: releases
Define the name of the directory under which every release is placed.
Default: current
Define the name of the directory (symlink to the last release) under which the current release is placed.
Default: 5
Number of releases to keep on the remote server.
- git 1.7.8+
- rsync 3+
- OpenSSH 5+
- GNU coreutils 5+
- GNU findutils 4.4.2+
This package uses conventional-changelog in order to autogenerate a CHANGELOG.md
file from commits.
Commits messages should follow the conventional commits standard and the Angular guidelines.
If you want to contribute:
- open a new issue;
- fork the repo or create a new branch from
master
with a reference to the issue *; - write some code;
- create a pull request from your repo/branch to
master
; - merge the PR - admin only;
- run
npm version [major|minor|patch]
onmaster
(this will also run the changelog generator) - admin only; - add a new git tag (annotation = package version) - admin only;
- push with
--follow-tags
flag - admin only.
* a good naming convention: feature/ISSUE_ID-description or fix/ISSUE_ID-description
Released under the Apache 2.0 license.