How to use the grunt.shipit function in grunt

To help you get started, we’ve selected a few grunt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shipitjs / grunt-shipit / test / unit / tasks / deploy / fetch.js View on Github external
grunt.shipit = shipit = new Shipit();
    shipit.stage = 'test';
    fetchFactory(grunt);
    gruntLog.silent();

    fetchFactory.__set__('mkdirp', mkdirpMock);

    // Shipit config
    shipit.initConfig({
      test: {
        workspace: '/tmp/workspace',
        repositoryUrl: 'git://website.com/user/repo'
      }
    });

    sinon.stub(grunt.shipit, 'local').yields();
  });
github shipitjs / grunt-shipit / test / unit / tasks / deploy / publish.js View on Github external
beforeEach(function () {
    grunt.shipit = shipit = new Shipit();
    shipit.stage = 'test';
    publishFactory(grunt);
    gruntLog.silent();

    // Shipit config
    shipit.initConfig({
      test: {
        deployTo: '/remote/deploy'
      }
    });

    shipit.releasePath = '/remote/deploy/releases/20141704123138';
    shipit.releaseDirname = '20141704123138';

    sinon.stub(shipit, 'remote').yields();
  });
github shipitjs / grunt-shipit / test / unit / tasks / deploy / update.js View on Github external
beforeEach(function () {
    grunt.shipit = shipit = new Shipit();
    shipit.stage = 'test';
    updateFactory(grunt);
    clock = sinon.useFakeTimers(1397730698075);
    gruntLog.silent();

    // Shipit config
    shipit.initConfig({
      test: {
        workspace: '/tmp/workspace',
        deployTo: '/remote/deploy'
      }
    });

    sinon.stub(shipit, 'remote').yields();
    sinon.stub(shipit, 'remoteCopy').yields();
  });
github shipitjs / grunt-shipit / test / unit / tasks / rollback / init.js View on Github external
beforeEach(function () {
    grunt.shipit = shipit = new Shipit();
    shipit.stage = 'test';
    initFactory(grunt);
    gruntLog.silent();

    // Shipit config
    shipit.initConfig({
      test: {
        workspace: '/tmp/workspace',
        deployTo: '/remote/deploy'
      }
    });
  });
github shipitjs / grunt-shipit / test / unit / tasks / deploy / clean.js View on Github external
runTask('deploy:clean', function (err) {
      if (err) return done(err);
      expect(shipit.remote).to.be.calledWith('(ls -rd /remote/deploy/releases/*|head -n 5;ls -d ' +
        grunt.shipit.releasesPath + '/*)|sort|uniq -u|' +
        'xargs rm -rf');
      done();
    });
  });