博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ruby git hook
阅读量:7084 次
发布时间:2019-06-28

本文共 465 字,大约阅读时间需要 1 分钟。

hot3.png

require 'webrick'require 'json'server = WEBrick::HTTPServer.new(:Port => ARGV.first)server.mount_proc '/' do |req, res|  # puts req.body  body = JSON.parse(req.body)  p body['commits'].first['message']  if body['ref'].include?('master') && body['commits'].first['message'].include?('push-191')     # system 'sh ~/git_deploy.sh'     puts "========"  end  res.body = 'ok'endtrap 'INT' do  server.shutdownendserver.start

转载于:https://my.oschina.net/u/923974/blog/471239

你可能感兴趣的文章
varnish使用yum安装及不同域名站点
查看>>
五分钟教会你分布式系统调用链监控
查看>>
VLAN与Trunk配置
查看>>
我的友情链接
查看>>
webservice调用报object is not an instance of declaring class错
查看>>
使用postfix发邮件被拒(UBE)的处理
查看>>
Shell学习NO.1——Shell的作用和使用技巧
查看>>
apache中 MaxClients 与MaxRequestsPerChild 并发数
查看>>
mfs+drbd+corosync+pacemaker+pcs+crmsh高可用分布式集群搭建
查看>>
linux-/etc/inittab,rc.sysinit,rc服务类脚本,chkconfig
查看>>
linux运维实战练习案例-2015年12月20日-12月31日(第一次)
查看>>
shell中字符串的截取方法、cut基本用法
查看>>
Install and Configure OpenStack Telemetry Metering Service (Ceilometer) for Ubuntu 14.04
查看>>
Linux 技巧:让进程在后台可靠运行的几种方法
查看>>
RowHandler的使用
查看>>
我的友情链接
查看>>
程序员辞职卖卷饼,4天挣了1个月工资……所以我应该改行卖卷饼吗?
查看>>
作业:Rsync+shell脚本完成自动化备份
查看>>
DKH企业级大数据解决方案的优势介绍
查看>>
arm嵌入式培训学校浅聊单片机、ARM、FPGA 、嵌入式开发的特点
查看>>