Terminator
What is it?
Terminator is a tool we use at inventid to prevent accidental merges of changes which have deployment impacts. It works by checking files of your Pull request. In case a PR has changed, added, or deleted a file which is listed it will set the PR to pending to indicate this has deployment consequences. This prevents accidental merges of such code
What does it look like?
Almost the same as Consuela, so I jsut borrowed that one
How to use it?
It works really simple:
- Copy the
default.json.example
todefault.json
- Edit the oauth token (that user should have write access to the repo)
- Add the repository
- Add the named files you wish to use to prevent merges
- Add the webhook (add a webhook to the URL the system is running, use
application/json
, and leave the secret empty. As the hook, only selectPull Request
. - Run system
Plain node
node server.js
Puppet
class terminator {
file { '/opt/terminator.json':
ensure => present,
source => 'puppet:///modules/terminator/config.json',
mode => '0600',
notify => Docker::Run['terminator']
}
docker::image { 'rogierslag/terminator:latest': }
docker::run { 'terminator':
image => 'rogierslag/terminator',
volumes => ['/opt/terminator.json:/opt/terminator/config/default.json'],
ports => ["${ipaddress_eth0}:8543:8543"]
}
firewall { '200 allow terminator':
dport => ['8543'],
proto => 'tcp',
action => 'accept'
}
}
Docker
sudo docker run -d -v /opt/terminator.json:/opt/terminator/config/default.json -p <IP>:8543:8543 rogierslag/terminator