Thursday, August 15, 2013

Jenkins + Multiple SCMs + git + hooks/triggers = mission Possible

Multiple SCMs plugin version 0.2 - in its documentation is remarked two controversial statements:
  • "Post-commit type triggers don't currently work".
  • "Allow polling to work with multiple instances" - in version 0.2
So is pooling possible? There are people on the internet stating the two opposite points. Yes, it is possible but some tricks are needed.

Friday, August 9, 2013

linux: demonizing a process and killing it when you want

This is very useful for processes which do not write an PID file. This is stupid... but it could be work-arounded.

For example I want to start ant kill later the jasmine server, which is started this way:
bundle exec rake jasmine:server --trace

magic apostrophes in linux = Back Quotes for Command Substitution

They are replaced by the output of the command between them:

kill -9 `echo 9999`

is equivalent to:

killing app, listening on a defined port in single line

In Linux this will kill the process, listening on port 8888:

ps aux | grep port=8888 | awk '{print $2}' | tail -n 1 | xargs kill -9