http://octopush.olx.com.ar/logging/
https://github.com/olx-inc/hubot-scripts
Hubot is a chat bot developed by GitHub.
Created for hipchat has conector for other services like gtalk and IRC.
Scripts are written in Coffescript language.
execute bash scripts
# check artifacts - Check artifacts versions in environment (available and deployed)
exec = require('child_process').exec;
module.exports = (robot)->
robot.respond /check (.*)/i, (msg) ->
env = msg.match[1]
switch env
when "prod"
#server = "repos2-mng"
server = "online-main-nms"
script="ssh "+server+" /usr/local/olx/rls/bin/check-artifacts-servers.sh"
else
#server = "testing-repos2"
server = "staging-nms"
env = "stage"
script="ssh "+server+" /usr/local/olx/rls/bin/check-artifacts-servers.sh"
console.log(script)
child = exec script, (error,stdout,stderr) ->
msg.send "artifacts in "+env+"\n" + stdout + "\n" + stderr
hubot script + bash script + github repo
code
notifications
# Description:
# octopush status
#
# Dependencies:
# None
#
# Commands:
# hubot octopush status - Displays octopush status <ON|OFF>
#
# Author:
# osvaldo.toja@olx.com
# OLS Release Team
exec = require('child_process').exec;
module.exports = (robot)->
robot.respond /octopush status/, (msg) ->
script="curl -s http://octopush.olx.com.ar/status"
child = exec script, (error,stdout,stderr) ->
msg.send "octopush status is " + stdout + "\n"
robot.respond /octopush start/, (msg) ->
script="curl -s http://octopush.olx.com.ar/resume"
child = exec script, (error,stdout,stderr) ->
msg.send "octopush was resumed: " + stdout + "\n"
robot.respond /octopush stop/, (msg) ->
script="curl -s http://octopush.olx.com.ar/pause"
child = exec script, (error,stdout,stderr) ->
msg.send "octopush was paused " + stdout + "\n"
interactuar con un servicio
http://hubot-control.olx.com.ar/hubots/3
https://github.com/olx-inc/hubot-scripts
web panel
This repository contains configuration files for jenkins servers. Each server stores the files under a different branch (the hostname of the server). The script is run from the cron and the code can be find on the master branch.
create nodes (might be same server on which jenkins is running) connecting with the user which will execute the scripts.
Removes the need for sudo privileges for the jenkins users in order to execute shell scripts as another user.
http://apidocjs.com/