Advertisement
Guest User

Untitled

a guest
May 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function push_build() {
  2. if [ "$#" -ne 1 ]; then
  3. echo "Usage: $0 <branch_name>"
  4. else
  5. echo "Pushing and building ${1}..."
  6. git push --set-upstream origin $1
  7. sleep 0.5
  8. trigger_result=`circleci trigger gospotcheck/gospotcheck $1`
  9. build_num=`echo $trigger_result | ruby -e "require 'JSON';json=JSON.parse(STDIN.read); puts json['build_num']"`
  10. echo "Triggered build ${build_num}"
  11. circleci notify gospotcheck/gospotcheck $build_num &
  12. fi
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement