Skip to content

serhii-bodnaruk/deploy_pin

 
 

Repository files navigation

Gem Version example workflow Maintainability Test Coverage

DeployPin

DeployPin

Sometimes we need to execute set of commands (tasks) after/before deployment. Most likely you use migrations for such things, but that is not what is related to migration at all. Also sometimes you need to execute some code before migration or later, after migration without blocking of main thread.

deploy_pins is exactly what you need.

Usage

DeployPin

To generate new task template file

rails g deploy_pin:task
# or
rails g deploy_pin:task --parallel

To list all pending tasks

rake deploy_pin:list

To run all pending tasks

rake deploy_pin:run

Groupped tasks

Please define allowed groups in config/initializers/deploy_pin.rb if you want to group tasks around "allowed_group"

rails g deploy_pin:task allowed_group
# or
rails g deploy_pin:task allowed_group --parallel

To list all pending tasks

rake deploy_pin:list[allowed_group]

To run all pending tasks

rake deploy_pin:run[allowed_group]

Run by uuid

To run some specific task by uuid

rake deploy_pin:run['uuid_1, uuid_2']

Or you can combine uuid and group

rake deploy_pin:run['uuid, allowed_group']

In case if you want to rerun task you should add exclamation mark in the end of uuid

rake deploy_pin:run['uuid_1!, uuid_2!']

Installation

Add this line to your application's Gemfile:

gem 'deploy_pin'

And then execute:

$ bundle

Or install it yourself as:

$ gem install deploy_pin

then generate configuration file

rails g deploy_pin:install

and run migration

rake db:migrate

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

About

pin task around deployment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 89.0%
  • HTML 10.9%
  • Shell 0.1%