Skip to content

Instantly share code, notes, and snippets.

@falsecz
Created March 5, 2014 20:03
Show Gist options
  • Save falsecz/9375442 to your computer and use it in GitHub Desktop.
Save falsecz/9375442 to your computer and use it in GitHub Desktop.
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 $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment