Friday, August 30, 2013
git flow kickstart
http://nvie.com/posts/a-git-flow-screencast/
http://vimeo.com/16018419
http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
https://github.com/nvie/gitflow
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:
Additional data:
http://git-scm.com/book/en/Customizing-Git-Git-Hooks
- "Post-commit type triggers don't currently work".
- "Allow polling to work with multiple instances" - in version 0.2
- for every GIT repo, defined in Multiple SCM plugin config, an "Unique SCM name (optional)" is needed.
- check the version of your GIT plugin (Multiple SCM plugin uses GIT plugin). When my git plugin version was 1.1.x, the pooling did not work, and updating to git plugin 1.4 solved my issue.
Additional data:
http://git-scm.com/book/en/Customizing-Git-Git-Hooks
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 extreme stupidness... 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
The whole batch script will be:
[ -f tmp/jasmine.pid ] && kill -9 `cat tmp/jasmine.pid` && rm tmp/jasmine.pid
bundle exec rake jasmine:server --trace &
echo $! > tmp/jasmine.pid
sleep 20
bundle exec rake jasmine:run
kill -9 `cat tmp/jasmine.pid`
rm tmp/jasmine.pid
Other information:
[-f file] && command - executes command if file exists
"echo $!" prints the pid of the last command in current console.
For example I want to start ant kill later the jasmine server, which is started this way:
bundle exec rake jasmine:server --trace
The whole batch script will be:
[ -f tmp/jasmine.pid ] && kill -9 `cat tmp/jasmine.pid` && rm tmp/jasmine.pid
bundle exec rake jasmine:server --trace &
echo $! > tmp/jasmine.pid
sleep 20
bundle exec rake jasmine:run
kill -9 `cat tmp/jasmine.pid`
rm tmp/jasmine.pid
My strings:
tmp/jasmine.pid - my pid file
bundle exec rake jasmine:server --trace - command to be deamonized
sleep 20 - this ensures time for the server to start
bundle exec rake jasmine:run - my task to be executed on the demonised process
Other information:
[-f file] && command - executes command if file exists
"echo $!" prints the pid of the last command in current console.
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:
kill -9 9999
kill -9 `echo 9999`
is equivalent to:
kill -9 9999
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
ps aux | grep port=8888 | awk '{print $2}' | tail -n 1 | xargs kill -9
Subscribe to:
Posts (Atom)