(command.CommandList children: [ (C {(Id.KW_Set set)} {(-eo)} {(pipefail)}) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MODE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [11] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:15) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MODE) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:MODE span_id:19) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonEquals arg_word:{(DQ (testing))}) ) } spids: [17] ) ] ) ] ) (command.ShFunction name: setup_circle body: (command.BraceGroup children: [ (C {(echo)} { (DQ ('=====> setup_circle on CIRCLE_NODE_INDEX: ') ($ Id.VSub_DollarName '$CIRCLE_NODE_INDEX') ) } ) (C {(sudo)} {(-E)} {(Id.Lit_VarLike 'CI=') (true)} {(make)} {(-e)} {(sshcommand)}) (C {(sudo)} {(usermod)} {(-G)} {(docker)} {(dokku)}) (C {(sudo)} {(rsync)} {(-a)} {(word_part.TildeSub token:(Token id:Id.Lit_TildeLike val:'~ubuntu' span_id:84)) (/.ssh/) } {(word_part.TildeSub token:(Token id:Id.Lit_TildeLike val:'~root' span_id:87)) (/.ssh/)} ) (C {(sudo)} {(chown)} {(-R)} {(root) (Id.Lit_Other ':') (root)} {(word_part.TildeSub token:(Token id:Id.Lit_TildeLike val:'~root' span_id:101)) (/.ssh/) } ) (C {(sudo)} {(sed)} {(--in-place)} {(SQ (Token id:Id.Lit_Chars val:'s:/home/ubuntu:/root:g' span_id:112))} {(word_part.TildeSub token:(Token id:Id.Lit_TildeLike val:'~root' span_id:115)) (/.ssh/config)} ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_Number '$1'))} right: {(DQ (buildstack))} ) ) (command.Simple words: [{(make)} {(-e)} {(stack)}] more_env: [(env_pair name:BUILD_STACK val:{(true)} spids:[139])] ) ] ) (C {(sudo)} {(-E)} {(Id.Lit_VarLike 'CI=') (true)} {(make)} {(-e)} {(install)}) (C {(sudo)} {(-E)} {(make)} {(-e)} {(setup-deploy-tests)}) (C {(make)} {(-e)} {(ci-dependencies)}) (C {(bash)} {(--version)}) (C {(docker)} {(version)}) (C {(lsb_release)} {(-a)}) (C {(sudo)} {(-E)} {(mkdir)} {(-p)} {(/home/dokku/.dokkurc)}) (C {(sudo)} {(-E)} {(chown)} {(dokku) (Id.Lit_Other ':') (ubuntu)} {(/home/dokku/.dokkurc)}) (C {(sudo)} {(-E)} {(chmod)} {(775)} {(/home/dokku/.dokkurc)}) (C {(sudo)} {(docker)} {(pull)} {(node) (Id.Lit_Other ':') (4)}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$CIRCLE_NODE_INDEX'))} ) ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$MODE'))} right: {(DQ (setup))} ) ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:287) ) ] action: [ (C {(setup_circle)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:299) arg_word: {($ Id.VSub_QMark '$?')} ) ] spids: [260 289] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:347) command_list: (command.CommandList children: [(C {(date)} {(Id.Lit_Other '+') (Id.Lit_Other '%') (s)})] ) ) } spids: [346] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$CIRCLE_NODE_INDEX'))} arms: [ (case_arm pat_list: [{(0)}] action: [ (C {(echo)} { (DQ ('=====> make unit-tests (1/4) on CIRCLE_NODE_INDEX: ') ($ Id.VSub_DollarName '$CIRCLE_NODE_INDEX') ) } ) (C {(sudo)} {(-E)} {(Id.Lit_VarLike 'UNIT_TEST_BATCH=') (1)} {(make)} {(-e)} {(unit-tests)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [390] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$RC')} right: {(0)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:405) ) ] action: [ (C {(echo)} {(DQ ('exit status: ') ($ Id.VSub_DollarName '$RC'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:418) arg_word: {($ Id.VSub_DollarName '$RC')} ) ] spids: [394 407] ) ] ) ] spids: [364 365 426 -1] ) (case_arm pat_list: [{(1)}] action: [ (C {(echo)} { (DQ ('=====> make unit-tests (2/4) on CIRCLE_NODE_INDEX: ') ($ Id.VSub_DollarName '$CIRCLE_NODE_INDEX') ) } ) (C {(sudo)} {(-E)} {(Id.Lit_VarLike 'UNIT_TEST_BATCH=') (2)} {(make)} {(-e)} {(unit-tests)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [456] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$RC')} right: {(0)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:471) ) ] action: [ (C {(echo)} {(DQ ('exit status: ') ($ Id.VSub_DollarName '$RC'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:484) arg_word: {($ Id.VSub_DollarName '$RC')} ) ] spids: [460 473] ) ] ) ] spids: [430 431 492 -1] ) (case_arm pat_list: [{(2)}] action: [ (C {(echo)} { (DQ ('=====> make unit-tests (3/4) on CIRCLE_NODE_INDEX: ') ($ Id.VSub_DollarName '$CIRCLE_NODE_INDEX') ) } ) (C {(sudo)} {(-E)} {(Id.Lit_VarLike 'UNIT_TEST_BATCH=') (3)} {(make)} {(-e)} {(unit-tests)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [522] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$RC')} right: {(0)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:537) ) ] action: [ (C {(echo)} {(DQ ('exit status: ') ($ Id.VSub_DollarName '$RC'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:550) arg_word: {($ Id.VSub_DollarName '$RC')} ) ] spids: [526 539] ) ] ) (C {(echo)} {(DQ ('=====> make deploy tests'))}) (C {(sudo)} {(-E)} {(make)} {(-e)} {(deploy-test-checks-root)} {(deploy-test-config)} {(deploy-test-multi)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [580] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$RC')} right: {(0)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:595) ) ] action: [ (C {(echo)} {(DQ ('exit status: ') ($ Id.VSub_DollarName '$RC'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:608) arg_word: {($ Id.VSub_DollarName '$RC')} ) ] spids: [584 597] ) ] ) ] spids: [496 497 616 -1] ) (case_arm pat_list: [{(3)}] action: [ (C {(echo)} { (DQ ('=====> make unit-tests (4/4) on CIRCLE_NODE_INDEX: ') ($ Id.VSub_DollarName '$CIRCLE_NODE_INDEX') ) } ) (C {(sudo)} {(-E)} {(Id.Lit_VarLike 'UNIT_TEST_BATCH=') (4)} {(make)} {(-e)} {(unit-tests)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [646] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$RC')} right: {(0)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:661) ) ] action: [ (C {(echo)} {(DQ ('exit status: ') ($ Id.VSub_DollarName '$RC'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:674) arg_word: {($ Id.VSub_DollarName '$RC')} ) ] spids: [650 663] ) ] ) ] spids: [620 621 682 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:end) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:687) command_list: (command.CommandList children: [(C {(date)} {(Id.Lit_Other '+') (Id.Lit_Other '%') (s)})] ) ) } spids: [686] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:runtime) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:end span_id:697)) right: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:start span_id:699) ) ) ) } spids: [695] ) ] ) (C {(echo)} { (DQ ('suite runtime: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:707) command_list: (command.CommandList children: [ (C {(date)} {(-u)} {(-d)} {(Id.Lit_Other '@') (${ Id.VSub_Name runtime)} {(Id.Lit_Other '+') (DQ ('%T'))} ) ] ) ) ) } ) ] )