Skip to content
This repository has been archived by the owner on Mar 18, 2018. It is now read-only.
/ grunt-shipit Public archive

Grunt plugin for Shipit automation and deployment tool.

License

Notifications You must be signed in to change notification settings

shipitjs/grunt-shipit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

This repository is no longer maintained, please use Shipit instead

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

grunt-shipit

Build Status Dependency Status devDependency Status

Shipit logo

Grunt plugin for Shipit, an automation engine and a deployment tool written for node / iojs.

If you prefer using Shipit without grunt, please go to Shipit repository.

Getting Started

This plugin requires Grunt ~0.4.0

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-shipit --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-shipit');

Usage

Example Gruntfile.js

module.exports = function (grunt) {
  grunt.initConfig({
    shipit: {
      options: {
        workspace: '/tmp/github-monitor',
        deployTo: '/tmp/deploy_to',
        repositoryUrl: 'https://github.com/user/repo.git',
        ignores: ['.git', 'node_modules'],
        keepReleases: 2,
        key: '/path/to/key',
        shallowClone: true
      },
      staging: {
        servers: ['[email protected]', '[email protected]']
      }
    }
  });

  grunt.loadNpmTasks('grunt-shipit');
  grunt.loadNpmTasks('shipit-deploy');

  grunt.registerTask('pwd', function () {
    grunt.shipit.remote('pwd', this.async());
  });
};

Launch command

grunt shipit:<environment> <tasks ...>

For more documentation about Shipit commands please refer to Shipit repository.

For more documentation about Shipit deploy task, please refer to Shipit deploy repository.

Upgrading from v0.5.x

Methods

Now all methods returns promises, you can still use callback but the result has changed.

Before:

shipit.remote('echo "hello"', function (err, stdout, stderr) {
  console.log(stdout, stderr);
});

Now:

shipit.remote('echo "hello"', function (err, res) {
  console.log(res.stdout, res.stderr);
});

Deployment task

The deployment task is now separated from Shipit. You must install it and load it separately:

npm install shipit-deploy
grunt.loadNpmTasks('shipit-deploy');

API change

The exposed property grunt.shipit.stage is now grunt.shipit.environment.

License

MIT

About

Grunt plugin for Shipit automation and deployment tool.

Resources

License

Stars

Watchers

Forks

Packages

No packages published