Skip to content

Commit 12009b0

Browse files
committed
Print all hipchat messages to jenkins as well.
Also use the proper return code when abbey has issues.
1 parent 965e7c2 commit 12009b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

util/vpc-tools/abbey.py

+5
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ def launch_and_configure(ec2_args):
647647

648648

649649
def send_hipchat_message(message):
650+
print(message)
650651
#If hipchat is configured send the details to the specified room
651652
if args.hipchat_api_token and args.hipchat_room_id:
652653
import hipchat
@@ -710,6 +711,7 @@ def send_hipchat_message(message):
710711
else:
711712
base_ami = args.base_ami
712713

714+
error_in_abbey_run = False
713715
try:
714716
sqs_queue = None
715717
instance_id = None
@@ -749,6 +751,7 @@ def send_hipchat_message(message):
749751
play=args.play,
750752
exception=repr(e))
751753
send_hipchat_message(message)
754+
error_in_abbey_run = True
752755
finally:
753756
print
754757
if not args.no_cleanup and not args.noop:
@@ -761,3 +764,5 @@ def send_hipchat_message(message):
761764
# Check to make sure we have an instance id.
762765
if instance_id:
763766
ec2.terminate_instances(instance_ids=[instance_id])
767+
if error_in_abbey_run:
768+
exit(1)

0 commit comments

Comments
 (0)