Skip to content

bjarneo/marathon-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marathon deploy

Travis

Deploy a docker image to Marathon.

Installation

$ npm i --save marathon-deploy

Usage

const deploy = require('marathon-deploy');

deploy('docker-image-tag')
    .then(res => {
      console.log('Success!');
      console.log('Id: %s', res.deploymentId);
      console.log('Version: %s', res.version);
    }).catch(err => {
        throw new Error(err);
    });

Options

const deploy = require('marathon-deploy');

const opts = {
    marathonFile: 'location/to/marathon.json' // default 'marathon.json'
};

deploy('docker-image-tag', opts)
  .then()
  .catch()

You can also pass marathon config as an object vs using an own file

const deploy = require('marathon-deploy');

const opts = {
    marathonConfig: {
        endpoint: 'your-endpoint.com',
        etc: 'some more data',
        even: 'more data'
    }
};

deploy('docker-image-tag', opts)
  .then()
  .catch()

Tests

$ npm test

Inspiration

grunt-marathon

Contribution

Contributions are appreciated.

License

MIT-licensed. See LICENSE.

About

Deploy a docker image to Marathon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published