jenkins-cli
function _jenkins() {
local cur tasks
cur="${COMP_WORDS[COMP_CWORD]}"
tasks="$(/Users/bender/bin/jenkins --jobs)"
COMPREPLY=( $(compgen -W "$tasks" $cur) )
}
complete -o default -F _jenkins jenkins c
#!/bin/bash
USER=benesl
PASS=`security find-internet-password -g -s jenkins.ccl -w`
if [ "$1" = "--jobs" ]
then
cat ~/bin/jenkins.tmp
exit
fi
if [ "$1" = "update" ]; then
ssh benesl@jenkins.ccl -p 2222 list-jobs > ~/bin/jenkins.tmp
exit
fi
ssh $USER@jenkins.ccl -p 2222 build -v -s $@