(command.CommandList children: [ (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (C {(Id.KW_Set set)} {(-o)} {(nounset)}) (C {(Id.KW_Set set)} {(-o)} {(pipefail)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USER_ID) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:67) command_list: (command.CommandList children:[(C {(id)} {(-u)})]) ) } spids: [66] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GROUP_ID) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:74) command_list: (command.CommandList children:[(C {(id)} {(-g)})]) ) } spids: [73] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DOCKER_OPTS) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER_OPTS span_id:83) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(DQ )}) ) } spids: [81] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DOCKER) op: assign_op.Equal rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:90) words: [{(docker)} {(${ Id.VSub_Name DOCKER_OPTS)}] ) } spids: [89] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DOCKER_HOST) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER_HOST span_id:100) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(DQ )}) ) } spids: [98] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DOCKER_MACHINE_NAME) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER_MACHINE_NAME span_id:108) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(DQ (kube-dev))}) ) } spids: [106] ) ] ) (C {(readonly)} {(Id.Lit_VarLike 'DOCKER_MACHINE_DRIVER=') (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER_MACHINE_DRIVER span_id:119) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(DQ ('virtualbox --virtualbox-cpu-count -1'))} ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_ROOT) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:131) command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:134) command_list: (command.CommandList children: [(C {(dirname)} {(DQ (${ Id.VSub_Name BASH_SOURCE))})] ) ) (/..) } ) (C {(pwd)} {(-P)}) ] ) ] ) ) } spids: [130] ) ] ) (C {(source)} {(DQ (${ Id.VSub_Name KUBE_ROOT) (/hack/lib/init.sh))}) (C {(readonly)} {(Id.Lit_VarLike 'KUBE_BUILD_IMAGE_REPO=') (kube-build)}) (C {(readonly)} {(Id.Lit_VarLike 'KUBE_BUILD_IMAGE_CROSS_TAG=') (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:175) command_list: (command.CommandList children: [(C {(cat)} {(${ Id.VSub_Name KUBE_ROOT) (/build/build-image/cross/VERSION)})] ) ) ) } ) (C {(readonly)} {(Id.Lit_VarLike 'KUBE_BUILD_IMAGE_VERSION_BASE=') (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:208) command_list: (command.CommandList children: [(C {(cat)} {(${ Id.VSub_Name KUBE_ROOT) (/build/build-image/VERSION)})] ) ) ) } ) (C {(readonly)} {(Id.Lit_VarLike 'KUBE_BUILD_IMAGE_VERSION=') (DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_VERSION_BASE) (-) (${ Id.VSub_Name KUBE_BUILD_IMAGE_CROSS_TAG) ) } ) (C {(readonly)} {(Id.Lit_VarLike 'LOCAL_OUTPUT_ROOT=') (DQ (${ Id.VSub_Name KUBE_ROOT) (/) (braced_var_sub token: (Token id:Id.VSub_Name val:OUT_DIR span_id:271) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(_output)}) ) ) } ) (C {(readonly)} {(Id.Lit_VarLike 'LOCAL_OUTPUT_SUBPATH=') (DQ (${ Id.VSub_Name LOCAL_OUTPUT_ROOT) (/dockerized))} ) (C {(readonly)} {(Id.Lit_VarLike 'LOCAL_OUTPUT_BINPATH=') (DQ (${ Id.VSub_Name LOCAL_OUTPUT_SUBPATH) (/bin))} ) (C {(readonly)} {(Id.Lit_VarLike 'LOCAL_OUTPUT_GOPATH=') (DQ (${ Id.VSub_Name LOCAL_OUTPUT_SUBPATH) (/go))} ) (C {(readonly)} {(Id.Lit_VarLike 'LOCAL_OUTPUT_IMAGE_STAGING=') (DQ (${ Id.VSub_Name LOCAL_OUTPUT_ROOT) (/images)) } ) (C {(readonly)} {(Id.Lit_VarLike 'THIS_PLATFORM_BIN=') (DQ (${ Id.VSub_Name LOCAL_OUTPUT_ROOT) (/bin))} ) (C {(readonly)} {(Id.Lit_VarLike 'REMOTE_ROOT=') (DQ (/go/src/) (${ Id.VSub_Name KUBE_GO_PACKAGE))}) (C {(readonly)} {(Id.Lit_VarLike 'REMOTE_OUTPUT_ROOT=') (DQ (${ Id.VSub_Name REMOTE_ROOT) (/_output))} ) (C {(readonly)} {(Id.Lit_VarLike 'REMOTE_OUTPUT_SUBPATH=') (DQ (${ Id.VSub_Name REMOTE_OUTPUT_ROOT) (/dockerized)) } ) (C {(readonly)} {(Id.Lit_VarLike 'REMOTE_OUTPUT_BINPATH=') (DQ (${ Id.VSub_Name REMOTE_OUTPUT_SUBPATH) (/bin))} ) (C {(readonly)} {(Id.Lit_VarLike 'REMOTE_OUTPUT_GOPATH=') (DQ (${ Id.VSub_Name REMOTE_OUTPUT_SUBPATH) (/go))} ) (C {(readonly)} {(Id.Lit_VarLike 'KUBE_RSYNC_PORT=') (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:KUBE_RSYNC_PORT span_id:394) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } ) (C {(readonly)} {(Id.Lit_VarLike 'KUBE_CONTAINER_RSYNC_PORT=') (8730)}) (command.ShFunction name: 'kube::build::get_docker_wrapped_binaries' body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debian_iptables_version) op: assign_op.Equal rhs: {(v8)} spids: [440] ) ] ) (command.Case to_match: {($ Id.VSub_Number '$1')} arms: [ (case_arm pat_list: [{(DQ (amd64))}] action: [ (C {(local)} {(Id.Lit_VarLike 'targets=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:468) words: [ {(cloud-controller-manager) (Id.Lit_Comma ',') (busybox)} {(kube-apiserver) (Id.Lit_Comma ',') (busybox)} {(kube-controller-manager) (Id.Lit_Comma ',') (busybox)} {(kube-scheduler) (Id.Lit_Comma ',') (busybox)} {(kube-aggregator) (Id.Lit_Comma ',') (busybox)} {(kube-proxy) (Id.Lit_Comma ',') (gcr.io/google-containers/debian-iptables-amd64) (Id.Lit_Other ':') (${ Id.VSub_Name debian_iptables_version) } ] ) } ) ] spids: [459 462 506 -1] ) (case_arm pat_list: [{(DQ (arm))}] action: [ (C {(local)} {(Id.Lit_VarLike 'targets=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:518) words: [ {(cloud-controller-manager) (Id.Lit_Comma ',') (arm32v7/busybox)} {(kube-apiserver) (Id.Lit_Comma ',') (arm32v7/busybox)} {(kube-controller-manager) (Id.Lit_Comma ',') (arm32v7/busybox)} {(kube-scheduler) (Id.Lit_Comma ',') (arm32v7/busybox)} {(kube-aggregator) (Id.Lit_Comma ',') (arm32v7/busybox)} {(kube-proxy) (Id.Lit_Comma ',') (gcr.io/google-containers/debian-iptables-arm) (Id.Lit_Other ':') (${ Id.VSub_Name debian_iptables_version) } ] ) } ) ] spids: [509 512 556 -1] ) (case_arm pat_list: [{(DQ (arm64))}] action: [ (C {(local)} {(Id.Lit_VarLike 'targets=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:568) words: [ {(cloud-controller-manager) (Id.Lit_Comma ',') (arm64v8/busybox)} {(kube-apiserver) (Id.Lit_Comma ',') (arm64v8/busybox)} {(kube-controller-manager) (Id.Lit_Comma ',') (arm64v8/busybox)} {(kube-scheduler) (Id.Lit_Comma ',') (arm64v8/busybox)} {(kube-aggregator) (Id.Lit_Comma ',') (arm64v8/busybox)} {(kube-proxy) (Id.Lit_Comma ',') (gcr.io/google-containers/debian-iptables-arm64) (Id.Lit_Other ':') (${ Id.VSub_Name debian_iptables_version) } ] ) } ) ] spids: [559 562 606 -1] ) (case_arm pat_list: [{(DQ (ppc64le))}] action: [ (C {(local)} {(Id.Lit_VarLike 'targets=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:618) words: [ {(cloud-controller-manager) (Id.Lit_Comma ',') (ppc64le/busybox)} {(kube-apiserver) (Id.Lit_Comma ',') (ppc64le/busybox)} {(kube-controller-manager) (Id.Lit_Comma ',') (ppc64le/busybox)} {(kube-scheduler) (Id.Lit_Comma ',') (ppc64le/busybox)} {(kube-aggregator) (Id.Lit_Comma ',') (ppc64le/busybox)} {(kube-proxy) (Id.Lit_Comma ',') (gcr.io/google-containers/debian-iptables-ppc64le) (Id.Lit_Other ':') (${ Id.VSub_Name debian_iptables_version) } ] ) } ) ] spids: [609 612 656 -1] ) (case_arm pat_list: [{(DQ (s390x))}] action: [ (C {(local)} {(Id.Lit_VarLike 'targets=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:668) words: [ {(cloud-controller-manager) (Id.Lit_Comma ',') (s390x/busybox)} {(kube-apiserver) (Id.Lit_Comma ',') (s390x/busybox)} {(kube-controller-manager) (Id.Lit_Comma ',') (s390x/busybox)} {(kube-scheduler) (Id.Lit_Comma ',') (s390x/busybox)} {(kube-aggregator) (Id.Lit_Comma ',') (s390x/busybox)} {(kube-proxy) (Id.Lit_Comma ',') (gcr.io/google-containers/debian-iptables-s390x) (Id.Lit_Other ':') (${ Id.VSub_Name debian_iptables_version) } ] ) } ) ] spids: [659 662 706 -1] ) ] ) (C {(echo)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:targets span_id:717) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ) ] ) ) (command.ShFunction name: 'kube::build::verify_prereqs' body: (command.BraceGroup children: [ (C {(local)} {(-r)} {(Id.Lit_VarLike 'require_docker=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:809) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(true)}) ) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Verifying Prerequisites....'))} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (ensure_tar) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:838) arg_word: {(1)} ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (ensure_rsync) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:853) arg_word: {(1)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(${ Id.VSub_Name require_docker)}) terminator: (Token id:Id.Op_Semi val:';' span_id:863) ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (ensure_docker_in_path) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:878) arg_word: {(1)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (is_osx) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:892) ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_available_on_osx) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:907) arg_word: {(1)} ) ] ) ] spids: [883 894] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (util) (Id.Lit_Other ':') (Id.Lit_Other ':') (ensure_docker_daemon_connectivity) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:925) arg_word: {(1)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.ArithWord w:{(${ Id.VSub_Name KUBE_VERBOSE)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 6)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:945) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Docker Version:'))} ) (command.Pipeline children: [ (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:965) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(version)} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (info_from_stdin) } ) ] negated: F ) ] spids: [931 947] ) ] ) ] spids: [858 865] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_GIT_BRANCH) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:993) command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(git)} {(symbolic-ref)} {(--short)} {(-q)} {(HEAD)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:1004) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(true)}) ] ) ] ) ) } spids: [992] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_ROOT_HASH) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1014) command_list: (command.CommandList children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (short_hash) } { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:HOSTNAME span_id:1025) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) (':') (${ Id.VSub_Name KUBE_ROOT) (':') (${ Id.VSub_Name KUBE_GIT_BRANCH) ) } ) ] ) ) } spids: [1013] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_BUILD_IMAGE_TAG_BASE) op: assign_op.Equal rhs: {(DQ (build-) (${ Id.VSub_Name KUBE_ROOT_HASH))} spids: [1040] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_BUILD_IMAGE_TAG) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_TAG_BASE) (-) (${ Id.VSub_Name KUBE_BUILD_IMAGE_VERSION) ) } spids: [1049] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_BUILD_IMAGE) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_REPO) (':') (${ Id.VSub_Name KUBE_BUILD_IMAGE_TAG) ) } spids: [1061] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_BUILD_CONTAINER_NAME_BASE) op: assign_op.Equal rhs: {(DQ (kube-build-) (${ Id.VSub_Name KUBE_ROOT_HASH))} spids: [1073] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_BUILD_CONTAINER_NAME) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name KUBE_BUILD_CONTAINER_NAME_BASE) (-) (${ Id.VSub_Name KUBE_BUILD_IMAGE_VERSION) ) } spids: [1082] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_RSYNC_CONTAINER_NAME_BASE) op: assign_op.Equal rhs: {(DQ (kube-rsync-) (${ Id.VSub_Name KUBE_ROOT_HASH))} spids: [1094] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_RSYNC_CONTAINER_NAME) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME_BASE) (-) (${ Id.VSub_Name KUBE_BUILD_IMAGE_VERSION) ) } spids: [1103] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_DATA_CONTAINER_NAME_BASE) op: assign_op.Equal rhs: {(DQ (kube-build-data-) (${ Id.VSub_Name KUBE_ROOT_HASH))} spids: [1115] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_DATA_CONTAINER_NAME) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME_BASE) (-) (${ Id.VSub_Name KUBE_BUILD_IMAGE_VERSION) ) } spids: [1124] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DOCKER_MOUNT_ARGS) op: assign_op.Equal rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:1137) words: [{(--volumes-from)} {(DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME))}] ) } spids: [1136] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LOCAL_OUTPUT_BUILD_CONTEXT) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name LOCAL_OUTPUT_IMAGE_STAGING) (/) (${ Id.VSub_Name KUBE_BUILD_IMAGE) ) } spids: [1148] ) ] ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (version) (Id.Lit_Other ':') (Id.Lit_Other ':') (get_version_vars) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (version) (Id.Lit_Other ':') (Id.Lit_Other ':') (save_version_vars) } {(DQ (${ Id.VSub_Name KUBE_ROOT) (/.dockerized-kube-version-defs))} ) ] ) ) (command.ShFunction name: 'kube::build::docker_available_on_osx' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ (${ Id.VSub_Name DOCKER_HOST))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1223) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_S child: {(DQ (/var/run/docker.sock))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1239) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Using Docker for MacOS'))} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1257) arg_word: {(0)} ) ] spids: [1228 1241] ) ] ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('No docker host is set. Checking options for setting one...'))} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1286 ) command_list: (command.CommandList children: [(C {(which)} {(docker-machine)})] ) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1294) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } { (DQ ( "It looks like you're running Mac OS X, yet neither Docker for Mac nor docker-machine can be found." ) ) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('See: https://docs.docker.com/engine/installation/mac/ for installation instructions.'))} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1325) arg_word: {(1)} ) ] spids: [1279 1296] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1337 ) command_list: (command.CommandList children: [(C {(which)} {(docker-machine)})] ) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1345) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (prepare_docker_machine) } ) ] spids: [1330 1347] ) ] ) ] spids: [1210 1225] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::prepare_docker_machine' body: (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('docker-machine was found.'))} ) (C {(local)} {(Id.Lit_VarLike 'available_memory_bytes=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1399) command_list: (command.CommandList children: [ (command.Simple words: [{(sysctl)} {(-n)} {(hw.memsize)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:1406) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) } ) (C {(local)} {(Id.Lit_VarLike 'bytes_in_mb=') (1048576)}) (C {(local)} {(Id.Lit_VarLike 'memory_divisor=') (2)}) (C {(local)} {(Id.Lit_VarLike 'virtualbox_memory_mb=') (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Slash left: (arith_expr.ArithWord w:{(${ Id.VSub_Name available_memory_bytes)}) right: (arith_expr.Binary op_id: Id.Arith_Star left: (arith_expr.ArithWord w:{(${ Id.VSub_Name bytes_in_mb)}) right: (arith_expr.ArithWord w:{(${ Id.VSub_Name memory_divisor)}) ) ) ) } ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(docker-machine)} {(inspect)} {(DQ (${ Id.VSub_Name DOCKER_MACHINE_NAME))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:1472) fd: -1 arg_word: {(/dev/null)} ) ] ) (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Creating a machine to build Kubernetes'))} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ {(docker-machine)} {(create)} {(--driver)} {(${ Id.VSub_Name DOCKER_MACHINE_DRIVER)} {(--virtualbox-memory)} {(DQ (${ Id.VSub_Name virtualbox_memory_mb))} {(--engine-env)} {(Id.Lit_VarLike 'HTTP_PROXY=') (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: KUBERNETES_HTTP_PROXY span_id: 1521 ) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } {(--engine-env)} {(Id.Lit_VarLike 'HTTPS_PROXY=') (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: KUBERNETES_HTTPS_PROXY span_id: 1533 ) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } {(--engine-env)} {(Id.Lit_VarLike 'NO_PROXY=') (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:KUBERNETES_NO_PROXY span_id:1545) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(127.0.0.1)} ) ) ) } {(DQ (${ Id.VSub_Name DOCKER_MACHINE_NAME))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1559) fd: -1 arg_word: {(/dev/null)} ) ] ) (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ('Something went wrong creating a machine.'))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ('Try the following: '))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } { (DQ ('docker-machine create -d ') (${ Id.VSub_Name DOCKER_MACHINE_DRIVER) (' --virtualbox-memory ') (${ Id.VSub_Name virtualbox_memory_mb) (' ') (${ Id.VSub_Name DOCKER_MACHINE_NAME) ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1618) arg_word: {(1)} ) ] ) ] ) ] ) ] ) (command.Simple words: [{(docker-machine)} {(start)} {(DQ (${ Id.VSub_Name DOCKER_MACHINE_NAME))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:1639) fd: -1 arg_word: {(/dev/null)} ) ] ) (C {(local)} {(docker_machine_out)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:1653) cond: [ (command.Sentence child: (command.Pipeline children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:docker_machine_out) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1658) command_list: (command.CommandList children: [ (command.Simple words: [ {(docker-machine)} {(env)} {(DQ (${ Id.VSub_Name DOCKER_MACHINE_NAME))} ] redirects: [ (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '2>&' span_id: 1669 ) fd: 2 arg_word: {(1)} ) ] ) ] ) ) } spids: [1657] ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1672) ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(${ Id.VSub_Name docker_machine_out)} right: {(DQ ('Error checking TLS connection'))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1692) ) ] action: [ (C {(echo)} {(${ Id.VSub_Name docker_machine_out)}) (C {(docker-machine)} {(regenerate-certs)} {(${ Id.VSub_Name DOCKER_MACHINE_NAME)} ) ] spids: [1677 1694] ) ] else_action: [(C {(sleep)} {(1)})] ) ] ) ) (C {(eval)} { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1729) command_list: (command.CommandList children: [ (C {(docker-machine)} {(env)} {(DQ (${ Id.VSub_Name DOCKER_MACHINE_NAME))}) ] ) ) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } { (DQ ("A Docker host using docker-machine named '") (${ Id.VSub_Name DOCKER_MACHINE_NAME) ("' is ready to go!") ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1759) arg_word: {(0)} ) ] ) ) (command.ShFunction name: 'kube::build::is_osx' body: (command.BraceGroup children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1784) command_list: (command.CommandList children:[(C {(uname)})]) ) ) } right: {(DQ (Darwin))} ) ) ] ) ) (command.ShFunction name: 'kube::build::is_gnu_sed' body: (command.BraceGroup children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1817) command_list: (command.CommandList children: [ (command.Simple words: [{(sed)} {(--version)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:1822) fd: 2 arg_word: {(1)} ) ] ) ] ) ) } right: {(Id.Lit_Other '*') (GNU) (Id.Lit_Other '*')} ) ) ] ) ) (command.ShFunction name: 'kube::build::ensure_rsync' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1859 ) command_list: (command.CommandList children: [(C {(which)} {(rsync)})] ) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1867) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ("Can't find 'rsync' in PATH, please fix and retry."))} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1885) arg_word: {(1)} ) ] spids: [1852 1869] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::update_dockerfile' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (is_gnu_sed) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:1919) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sed_opts) op: assign_op.Equal rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:1925) words: [{(-i)}] ) } spids: [1924] ) ] ) ] spids: [1910 1921] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sed_opts) op: assign_op.Equal rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:1934) words: [{(-i)} {(SQ )}] ) } spids: [1933] ) ] ) ] ) (C {(sed)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:sed_opts span_id:1949) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(DQ (s/KUBE_BUILD_IMAGE_CROSS_TAG/) (${ Id.VSub_Name KUBE_BUILD_IMAGE_CROSS_TAG) (/))} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/Dockerfile))} ) ] ) ) (command.ShFunction name: 'kube::build::set_proxy' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: KUBERNETES_HTTPS_PROXY span_id: 1997 ) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2003) ) ] action: [ (command.Simple words: [ {(echo)} {(DQ ('ENV https_proxy ') ($ Id.VSub_DollarName '$KUBERNETES_HTTPS_PROXY'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:2015) fd: -1 arg_word: {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/Dockerfile))} ) ] ) ] spids: [1989 2005] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: KUBERNETES_HTTP_PROXY span_id: 2036 ) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2042) ) ] action: [ (command.Simple words: [ {(echo)} {(DQ ('ENV http_proxy ') ($ Id.VSub_DollarName '$KUBERNETES_HTTP_PROXY'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:2054) fd: -1 arg_word: {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/Dockerfile))} ) ] ) ] spids: [2028 2044] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: KUBERNETES_NO_PROXY span_id: 2075 ) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2081) ) ] action: [ (command.Simple words: [ {(echo)} {(DQ ('ENV no_proxy ') ($ Id.VSub_DollarName '$KUBERNETES_NO_PROXY'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:2093) fd: -1 arg_word: {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/Dockerfile))} ) ] ) ] spids: [2067 2083] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::ensure_docker_in_path' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2130 ) command_list: (command.CommandList children: [(C {(which)} {(docker)})] ) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2138) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ("Can't find 'docker' in PATH, please fix and retry."))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ('See https://docs.docker.com/installation/#installation for installation instructions.'))} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2169) arg_word: {(1)} ) ] spids: [2123 2140] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::ensure_tar' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:TAR span_id:2202) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2208) ) ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2213) ) ] spids: [2194 2210] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TAR) op: assign_op.Equal rhs: {(tar)} spids: [2224] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [{(which)} {(gtar)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:2234) fd: -1 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:2236) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TAR) op: assign_op.Equal rhs: {(gtar)} spids: [2241] ) ] ) ] spids: [2228 2238] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [{(which)} {(gnutar)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:2254) fd: -1 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:2256) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TAR) op: assign_op.Equal rhs: {(gnutar)} spids: [2261] ) ] ) ] spids: [2248 2258] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(DQ (${ Id.VSub_Name TAR))} {(--version)}) (C {(grep)} {(-q)} {(GNU)}) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:2290) ) ] action: [ (C {(echo)} {(DQ (' !!! Cannot find GNU tar. Build on Linux or install GNU tar'))}) (C {(echo)} {(DQ (' on Mac OS X (brew install gnu-tar).'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2309) arg_word: {(1)} ) ] spids: [2271 2292] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::has_docker' body: (command.BraceGroup children: [ (command.Simple words: [{(which)} {(docker)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:2338) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) ) (command.ShFunction name: 'kube::build::has_ip' body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(ip)} {(-Version)}) (command.Simple words: [{(grep)} {(SQ (Token id:Id.Lit_Chars val:iproute2 span_id:2369))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:2372) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: F ) ] ) ) (command.ShFunction name: 'kube::build::docker_image_exists' body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Unary op_id:Id.BoolUnary_n child:{($ Id.VSub_Number '$1')}) right: (bool_expr.Unary op_id:Id.BoolUnary_n child:{($ Id.VSub_Number '$2')}) ) ) (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ('Internal error. Image not specified in docker_image_exists.'))} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:2438) arg_word: {(2)} ) ] ) ] ) (command.DBracket expr: (bool_expr.WordTest w: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2449) command_list: (command.CommandList children: [ (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:2452) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(images)} {(-q)} {(DQ (${ Id.VSub_Number 1) (':') (${ Id.VSub_Number 2))} ) ] ) ) } ) ) ] ) ) (command.ShFunction name: 'kube::build::docker_delete_old_images' body: (command.BraceGroup children: [ (command.ForEach iter_name: tag iter_words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2523) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:2526) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(images)} {(${ Id.VSub_Number 1)} ) (C {(tail)} {(-n)} {(Id.Lit_Other '+') (2)}) (C {(awk)} {(SQ (Token id:Id.Lit_Chars val:'{print $2}' span_id:2553))}) ] negated: F ) ] ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ (${ Id.VSub_Name tag))} right: {(DQ (${ Id.VSub_Number 2)) (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2583) ) ] action: [ (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } { (DQ ('Keeping image ') (${ Id.VSub_Number 1) (':') (${ Id.VSub_Name tag) ) } ] more_env: [(env_pair name:V val:{(3)} spids:[2588])] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Continue val:continue span_id:2611) ) ] spids: [2562 2585] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Unary op_id: Id.BoolUnary_z child: { (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:3 span_id:2626) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: (word.Empty) ) ) ) } ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ (${ Id.VSub_Name tag))} right: {(DQ (${ Id.VSub_Number 3))} ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2649) ) ] action: [ (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } { (DQ ('Deleting image ') (${ Id.VSub_Number 1) (':') (${ Id.VSub_Name tag) ) } ] more_env: [(env_pair name:V val:{(2)} spids:[2654])] ) (command.Simple words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:2679) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(rmi)} {(DQ (${ Id.VSub_Number 1) (':') (${ Id.VSub_Name tag))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2698) fd: -1 arg_word: {(/dev/null)} ) ] ) ] spids: [2618 2651] ) ] else_action: [ (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } { (DQ ('Keeping image ') (${ Id.VSub_Number 1) (':') (${ Id.VSub_Name tag)) } ] more_env: [(env_pair name:V val:{(3)} spids:[2705])] ) ] ) ] ) ) ] ) ) (command.ShFunction name: 'kube::build::docker_delete_old_containers' body: (command.BraceGroup children: [ (command.ForEach iter_name: container iter_words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2777) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:2780) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(ps)} {(-a)} ) (C {(tail)} {(-n)} {(Id.Lit_Other '+') (2)}) (C {(awk)} {(SQ (Token id:Id.Lit_Chars val:'{print $NF}' span_id:2805))}) ] negated: F ) ] ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ (${ Id.VSub_Name container))} right: {(DQ (${ Id.VSub_Number 1)) (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2835) ) ] action: [ (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Keeping container ') (${ Id.VSub_Name container))} ] more_env: [(env_pair name:V val:{(3)} spids:[2840])] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Continue val:continue span_id:2859) ) ] spids: [2814 2837] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Unary op_id: Id.BoolUnary_z child: { (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:2873) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: (word.Empty) ) ) ) } ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ (${ Id.VSub_Name container))} right: {(DQ (${ Id.VSub_Number 2))} ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2896) ) ] action: [ (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Deleting container ') (${ Id.VSub_Name container))} ] more_env: [(env_pair name:V val:{(2)} spids:[2901])] ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (destroy_container) } {(DQ (${ Id.VSub_Name container))} ) ] spids: [2865 2898] ) ] else_action: [ (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Keeping container ') (${ Id.VSub_Name container))} ] more_env: [(env_pair name:V val:{(3)} spids:[2938])] ) ] ) ] ) ) ] ) ) (command.ShFunction name: 'kube::build::short_hash' body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {($ Id.VSub_Pound '$#')} right: {(1)} ) ) (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ('Internal error. No data based to short_hash.'))} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:3011) arg_word: {(2)} ) ] ) ] ) (C {(local)} {(short_hash)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [{(which)} {(md5)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:3031) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:3034) fd: 2 arg_word: {(1)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:3036) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:short_hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3042) command_list: (command.CommandList children: [(C {(md5)} {(-q)} {(-s)} {(DQ ($ Id.VSub_Number '$1'))})] ) ) } spids: [3041] ) ] ) ] spids: [3025 3038] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:short_hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3059) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(-n)} {(DQ ($ Id.VSub_Number '$1'))}) (C {(md5sum)}) ] negated: F ) ] ) ) } spids: [3058] ) ] ) ] ) (C {(echo)} { (braced_var_sub token: (Token id:Id.VSub_Name val:short_hash span_id:3080) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Id.Lit_Digits 10)}) ) ) } ) ] ) ) (command.ShFunction name: 'kube::build::destroy_container' body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:3119) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(kill)} {(DQ ($ Id.VSub_Number '$1'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:3132) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:3135) fd: 2 arg_word: {(1)} ) ] ) (C {(true)}) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobEqual left: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3147) command_list: (command.CommandList children: [ (C { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: DOCKER span_id: 3150 ) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(version)} {(--format)} {(SQ (Token id:Id.Lit_Chars val:'{{.Server.Version}}' span_id:3162))} ) ] ) ) } right: {(17.06.0) (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3172) ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:3190) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(wait)} {(DQ ($ Id.VSub_Number '$1'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:3203) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:3206) fd: 2 arg_word: {(1)} ) ] more_env: [(env_pair name:DOCKER_API_VERSION val:{(v1.29)} spids:[3185])] ) (C {(true)}) ] ) ] spids: [3143 3174] ) ] else_action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:3219) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(wait)} {(DQ ($ Id.VSub_Number '$1'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:3232) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:3235) fd: 2 arg_word: {(1)} ) ] ) (C {(true)}) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:3248) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(rm)} {(-f)} {(-v)} {(DQ ($ Id.VSub_Number '$1'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:3265) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:3268) fd: 2 arg_word: {(1)} ) ] ) (C {(true)}) ] ) ] ) ) (command.ShFunction name: 'kube::build::clean' body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (has_docker) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:3311) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_containers) } {(DQ (${ Id.VSub_Name KUBE_BUILD_CONTAINER_NAME_BASE))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_containers) } {(DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME_BASE))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_containers) } {(DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME_BASE))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_images) } {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_REPO))} {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_TAG_BASE))} ) (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Cleaning all untagged docker images'))} ] more_env: [(env_pair name:V val:{(2)} spids:[3383])] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:3401) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(rmi)} { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3410) command_list: (command.CommandList children: [ (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:3413) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(images)} {(-q)} {(--filter)} {(SQ (Token id:Id.Lit_Chars val:'dangling=true' span_id:3427))} ) ] ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:3431) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(true)}) ] ) ] spids: [3301 3313] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_d child: {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_ROOT))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3457) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Removing _output directory'))} ) (C {(rm)} {(-rf)} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_ROOT))}) ] spids: [3444 3459] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::build_image' body: (command.BraceGroup children: [ (C {(mkdir)} {(-p)} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT))}) (C {(chown)} {(-R)} {(${ Id.VSub_Name USER_ID) (Id.Lit_Other ':') (${ Id.VSub_Name GROUP_ID)} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT))} ) (C {(cp)} {(/etc/localtime)} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/))}) (C {(cp)} {(build/build-image/Dockerfile)} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/Dockerfile))} ) (C {(cp)} {(build/build-image/rsyncd.sh)} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/))} ) (command.Pipeline children: [ (command.Simple words: [ {(dd)} {(Id.Lit_VarLike 'if=') (/dev/urandom)} {(Id.Lit_VarLike 'bs=') (512)} {(Id.Lit_VarLike 'count=') (1)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:3592) fd: 2 arg_word: {(/dev/null)} ) ] ) (command.Simple words: [{(tr)} {(-dc)} {(SQ (Token id:Id.Lit_Chars val:A-Za-z0-9 span_id:3605))}] more_env: [(env_pair name:LC_ALL val:{(C)} spids:[3597])] ) (command.Simple words: [{(dd)} {(Id.Lit_VarLike 'bs=') (32)} {(Id.Lit_VarLike 'count=') (1)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:3618) fd: 2 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:3621) fd: -1 arg_word: {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/rsyncd.password))} ) ] ) ] negated: F ) (C {(chmod)} {(Id.Lit_VarLike 'go=')} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/rsyncd.password))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (update_dockerfile) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (set_proxy) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_build) } {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE))} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT))} {(SQ (Token id:Id.Lit_Chars val:false span_id:3683))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_containers) } {(DQ (${ Id.VSub_Name KUBE_BUILD_CONTAINER_NAME_BASE))} {(DQ (${ Id.VSub_Name KUBE_BUILD_CONTAINER_NAME))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_containers) } {(DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME_BASE))} {(DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_containers) } {(DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME_BASE))} {(DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (docker_delete_old_images) } {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_REPO))} {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_TAG_BASE))} {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE_TAG))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (ensure_data_container) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (sync_to_container) } ) ] ) ) (command.ShFunction name: 'kube::build::docker_build' body: (command.BraceGroup children: [ (C {(local)} {(-r)} {(Id.Lit_VarLike 'image=') ($ Id.VSub_Number '$1')}) (C {(local)} {(-r)} {(Id.Lit_VarLike 'context_dir=') ($ Id.VSub_Number '$2')}) (C {(local)} {(-r)} {(Id.Lit_VarLike 'pull=') (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:3 span_id:3853) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(true)}) ) ) } ) (C {(local)} {(-ra)} {(Id.Lit_VarLike 'build_cmd=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:3865) words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:3868) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(build)} {(-t)} {(DQ (${ Id.VSub_Name image))} {(DQ ('--pull=') (${ Id.VSub_Name pull))} {(DQ (${ Id.VSub_Name context_dir))} ] ) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Building Docker image ') (${ Id.VSub_Name image))} ) (C {(local)} {(docker_output)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:docker_output) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3923) command_list: (command.CommandList children: [ (command.Simple words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:build_cmd span_id:3926) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:3933) fd: 2 arg_word: {(1)} ) ] ) ] ) ) } spids: [3922] ) ] ) (command.BraceGroup children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:3944) fd: -1 here_begin: {(EOF)} here_end_span_id: 3972 stdin_parts: [ ('+++ Docker build command failed for ') (${ Id.VSub_Name image) ('\n') ('\n') (${ Id.VSub_Name docker_output) ('\n') ('\n') ('To retry manually, run:\n') ('\n') (braced_var_sub token: (Token id:Id.VSub_Name val:build_cmd span_id:3964) bracket_op: (bracket_op.WholeArray op_id:Id.Arith_Star) ) ('\n') ('\n') ] ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:3947) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:3974) arg_word: {(1)} ) ] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::ensure_data_container' body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'ret=') (0)}) (C {(local)} {(Id.Lit_VarLike 'code=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4016) command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ {(docker)} {(inspect)} {(-f)} {(SQ (Token id:Id.Lit_Chars val:'{{.State.ExitCode}}' span_id:4026))} {(DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:4037) fd: 2 arg_word: {(/dev/null)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [4042] ) ] ) ] ) ] ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ (${ Id.VSub_Name ret))} right: {(0)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ (${ Id.VSub_Name code))} right: {(0)} ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4074) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (destroy_container) } {(DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: assign_op.Equal rhs: {(1)} spids: [4094] ) ] ) ] spids: [4047 4076] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ (${ Id.VSub_Name ret))} right: {(0)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4116) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Creating data container ') (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME))} ) (C {(mkdir)} {(-p)} {(DQ (${ Id.VSub_Name LOCAL_OUTPUT_GOPATH))}) (C {(local)} {(-ra)} {(Id.Lit_VarLike 'docker_cmd=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4193) words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:4198) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(run)} {(--volume)} {(DQ (${ Id.VSub_Name REMOTE_ROOT))} {(--volume)} {(/usr/local/go/pkg/linux_386_cgo)} {(--volume)} {(/usr/local/go/pkg/linux_amd64_cgo)} {(--volume)} {(/usr/local/go/pkg/linux_arm_cgo)} {(--volume)} {(/usr/local/go/pkg/linux_arm64_cgo)} {(--volume)} {(/usr/local/go/pkg/linux_ppc64le_cgo)} {(--volume)} {(/usr/local/go/pkg/darwin_amd64_cgo)} {(--volume)} {(/usr/local/go/pkg/darwin_386_cgo)} {(--volume)} {(/usr/local/go/pkg/windows_amd64_cgo)} {(--volume)} {(/usr/local/go/pkg/windows_386_cgo)} {(--name)} {(DQ (${ Id.VSub_Name KUBE_DATA_CONTAINER_NAME))} {(--hostname)} {(DQ (${ Id.VSub_Name HOSTNAME))} {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE))} {(chown)} {(-R)} {(${ Id.VSub_Name USER_ID) (Id.Lit_Other ':') (${ Id.VSub_Name GROUP_ID)} {(DQ (${ Id.VSub_Name REMOTE_ROOT))} {(/usr/local/go/pkg/)} ] ) } ) (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:docker_cmd span_id:4318) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ) ] spids: [4101 4118] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::run_build_command' body: (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Running build command...'))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (run_build_command_ex) } {(DQ (${ Id.VSub_Name KUBE_BUILD_CONTAINER_NAME))} {(--)} {(DQ ($ Id.VSub_At '$@'))} ) ] ) ) (command.ShFunction name: 'kube::build::run_build_command_ex' body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_Pound '$#')} right: {(0)} ) ) (command.BraceGroup children: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('Invalid input - please specify a container name.'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:4438) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:4440) ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:4442) arg_word: {(4)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:4445) ) ] ) ] ) (C {(local)} {(Id.Lit_VarLike 'container_name=') (DQ (${ Id.VSub_Number 1))}) (C {(shift)}) (C {(local)} {(-a)} {(Id.Lit_VarLike 'docker_run_opts=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4469) words: [ {(DQ ('--name=') (${ Id.VSub_Name container_name))} { (DQ ('--user=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4482) command_list: (command.CommandList children:[(C {(id)} {(-u)})]) ) (':') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4488) command_list: (command.CommandList children:[(C {(id)} {(-g)})]) ) ) } {(DQ ('--hostname=') (${ Id.VSub_Name HOSTNAME))} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER_MOUNT_ARGS span_id:4506) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] ) } ) (C {(local)} {(Id.Lit_VarLike 'detach=') (false)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_Pound '$#')} right: {(0)} ) ) (command.BraceGroup children: [ (command.Sentence child: (command.Simple words: [ {(echo)} {(DQ ('Invalid input - please specify docker arguments followed by --.'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:4545) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:4547) ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:4549) arg_word: {(4)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:4552) ) ] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_Until val:until span_id:4561) cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-z)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:4569) suffix_op: (suffix_op.Unary op_id:Id.VTest_Hyphen arg_word:(word.Empty)) ) ) } {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:4576) ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_Number '$1'))} right: {(DQ (--))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4596) ) ] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:4604) ) ] spids: [4581 4598] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:docker_run_opts) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4611) words: [{(DQ ($ Id.VSub_Number '$1'))}] ) } spids: [4610] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_Number '$1'))} right: {(DQ (-d))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_Number '$1'))} right: {(DQ (--detach))} ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4646) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:detach) op: assign_op.Equal rhs: {(true)} spids: [4651] ) ] ) ] spids: [4618 4648] ) ] ) (C {(shift)}) ] ) ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_Pound '$#')} right: {(0)} ) ) (command.BraceGroup children: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('Invalid input - please specify a command to run.'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:4689) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:4691) ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:4693) arg_word: {(4)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:4696) ) ] ) ] ) (C {(local)} {(-a)} {(Id.Lit_VarLike 'cmd=') (sh_array_literal left:(Token id:Id.Op_LParen val:'(' span_id:4706)) } ) (command.WhileUntil keyword: (Token id:Id.KW_Until val:until span_id:4710) cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-z)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:4718) suffix_op: (suffix_op.Unary op_id:Id.VTest_Hyphen arg_word:(word.Empty)) ) ) } {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:4725) ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4731) words: [{(DQ ($ Id.VSub_Number '$1'))}] ) } spids: [4730] ) ] ) (C {(shift)}) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:docker_run_opts) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4746) words: [ {(--env)} { (DQ ('KUBE_FASTBUILD=') (braced_var_sub token: (Token id:Id.VSub_Name val:KUBE_FASTBUILD span_id:4754) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(false)} ) ) ) } {(--env)} { (DQ ('KUBE_BUILDER_OS=') (braced_var_sub token: (Token id:Id.VSub_Name val:OSTYPE span_id:4766) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(notdetected)} ) ) ) } {(--env)} {(DQ ('KUBE_VERBOSE=') (${ Id.VSub_Name KUBE_VERBOSE))} {(--env)} { (DQ ('GOFLAGS=') (braced_var_sub token: (Token id:Id.VSub_Name val:GOFLAGS span_id:4788) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } {(--env)} { (DQ ('GOLDFLAGS=') (braced_var_sub token: (Token id:Id.VSub_Name val:GOLDFLAGS span_id:4799) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } {(--env)} { (DQ ('GOGCFLAGS=') (braced_var_sub token: (Token id:Id.VSub_Name val:GOGCFLAGS span_id:4810) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty)) ) ) } ] ) } spids: [4745] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr:(bool_expr.Unary op_id:Id.BoolUnary_t child:{(0)})) terminator: (Token id:Id.Op_Semi val:';' span_id:4845) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:docker_run_opts) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4851) words: [{(--interactive)} {(--tty)}] ) } spids: [4850] ) ] ) ] spids: [4836 4847] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ (${ Id.VSub_Name detach))} right: {(false)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4873) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:docker_run_opts) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4879) words: [ {(--attach) (Id.Lit_Equals '=') (stdout)} {(--attach) (Id.Lit_Equals '=') (stderr)} ] ) } spids: [4878] ) ] ) ] spids: [4858 4875] ) ] ) (C {(local)} {(-ra)} {(Id.Lit_VarLike 'docker_cmd=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4899) words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:4904) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(run)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:docker_run_opts span_id:4915) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(DQ (${ Id.VSub_Name KUBE_BUILD_IMAGE))} ] ) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (destroy_container) } {(DQ (${ Id.VSub_Name container_name))} ) (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:docker_cmd span_id:4952) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:cmd span_id:4961) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ (${ Id.VSub_Name detach))} right: {(false)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4984) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (destroy_container) } {(DQ (${ Id.VSub_Name container_name))} ) ] spids: [4969 4986] ) ] ) ] ) ) (command.ShFunction name: 'kube::build::rsync_probe' body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'tries=') (20)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:5032) cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.ArithWord w:{(${ Id.VSub_Name tries)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:5047) ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [ {(rsync)} { (DQ ('rsync://k8s@') (${ Id.VSub_Number 1) (':') (${ Id.VSub_Number 2) (/) ) } {(--password-file) (Id.Lit_Equals '=') (DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/rsyncd.password) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:5081) fd: -1 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:5085) ) ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:5090) arg_word: {(0)} ) ] spids: [5052 5087] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tries) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w:{(${ Id.VSub_Name tries)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } spids: [5098] ) ] ) (C {(sleep)} {(0.1)}) ] ) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:5121) arg_word: {(1)} ) ] ) ) (command.ShFunction name: 'kube::build::start_rsyncd_container' body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IPTOOL) op: assign_op.Equal rhs: {(ifconfig)} spids: [5158] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (has_ip) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:5172) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IPTOOL) op: assign_op.Equal rhs: {(DQ ('ip address'))} spids: [5177] ) ] ) ] spids: [5162 5174] ) ] ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (stop_rsyncd_container) } ) (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Starting rsyncd container'))} ] more_env: [(env_pair name:V val:{(3)} spids:[5195])] ) (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (run_build_command_ex) } {(DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME))} {(-p)} {(127.0.0.1) (Id.Lit_Other ':') (${ Id.VSub_Name KUBE_RSYNC_PORT) (Id.Lit_Other ':') (${ Id.VSub_Name KUBE_CONTAINER_RSYNC_PORT) } {(-d)} {(-e)} {(Id.Lit_VarLike 'ALLOW_HOST=') (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5247) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(${ Id.VSub_Name IPTOOL)}) (C {(grep)} {(-Eo)} { (SQ (Token id: Id.Lit_Chars val: 'inet (addr:)?([0-9]*\\.){3}[0-9]*' span_id: 5259 ) ) } ) (C {(grep)} {(-Eo)} { (SQ (Token id: Id.Lit_Chars val: '([0-9]*\\.){3}[0-9]*' span_id: 5269 ) ) } ) (C {(grep)} {(-v)} {(SQ (Token id:Id.Lit_Chars val:127.0.0.1 span_id:5279))} ) ] negated: F ) ] ) ) ) } {(--)} {(/rsyncd.sh)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:5290) fd: -1 arg_word: {(/dev/null)} ) ] ) (C {(local)} {(mapped_port)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mapped_port) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5305 ) command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.Simple words: [ { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: DOCKER span_id: 5308 ) bracket_op: (bracket_op.WholeArray op_id: Id.Lit_At ) ) ) } {(port)} { (DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME) ) } {(${ Id.VSub_Name KUBE_CONTAINER_RSYNC_PORT)} ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '2>' span_id: 5327 ) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(cut)} {(-d) (Id.Lit_Other ':')} {(-f)} {(2)}) ] negated: F ) ] ) ) } spids: [5304] ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:5343) ) ] action: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } {(DQ ('Could not get effective rsync port'))} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:5361) arg_word: {(1)} ) ] spids: [5300 5345] ) ] ) (C {(local)} {(container_ip)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:container_ip) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5376) command_list: (command.CommandList children: [ (C { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:DOCKER span_id:5379) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(inspect)} {(--format)} { (SQ (Token id: Id.Lit_Chars val: '{{ .NetworkSettings.IPAddress }}' span_id: 5391 ) ) } {(DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME))} ) ] ) ) } spids: [5375] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (rsync_probe) } {(127.0.0.1)} {(${ Id.VSub_Name mapped_port)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:5438) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_RSYNC_ADDR) op: assign_op.Equal rhs: {(DQ ('127.0.0.1:') (${ Id.VSub_Name mapped_port))} spids: [5443] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:5452) arg_word: {(0)} ) ] spids: [5423 5440] ) (if_arm cond: [ (command.Sentence child: (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (rsync_probe) } {(DQ (${ Id.VSub_Name container_ip))} {(${ Id.VSub_Name KUBE_CONTAINER_RSYNC_PORT)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:5476) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KUBE_RSYNC_ADDR) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name container_ip) (':') (${ Id.VSub_Name KUBE_CONTAINER_RSYNC_PORT) ) } spids: [5481] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:5493) arg_word: {(0)} ) ] spids: [5457 5478] ) ] ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (error) } { (DQ ( 'Could not connect to rsync container. See build/README.md for setting up remote Docker engine.' ) ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:5515) arg_word: {(1)} ) ] ) ) (command.ShFunction name: 'kube::build::stop_rsyncd_container' body: (command.BraceGroup children: [ (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Stopping any currently running rsyncd container'))} ] more_env: [(env_pair name:V val:{(3)} spids:[5537])] ) (C {(unset)} {(KUBE_RSYNC_ADDR)}) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (destroy_container) } {(DQ (${ Id.VSub_Name KUBE_RSYNC_CONTAINER_NAME))} ) ] ) ) (command.ShFunction name: 'kube::build::rsync' body: (command.BraceGroup children: [ (C {(local)} {(-a)} {(Id.Lit_VarLike 'rsync_opts=') (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:5593) words: [ {(--archive)} {(--password-file) (Id.Lit_Equals '=') (DQ (${ Id.VSub_Name LOCAL_OUTPUT_BUILD_CONTEXT) (/rsyncd.password)) } ] ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: (arith_expr.ArithWord w:{(${ Id.VSub_Name KUBE_VERBOSE)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 6)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:5626) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rsync_opts) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:5632) words: [{(DQ (-iv))}] ) } spids: [5631] ) ] ) ] spids: [5612 5628] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.ArithWord w:{(${ Id.VSub_Name KUBE_RSYNC_COMPRESS)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:5656) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rsync_opts) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:5662) words: [ {(DQ ('--compress-level=') (${ Id.VSub_Name KUBE_RSYNC_COMPRESS))} ] ) } spids: [5661] ) ] ) ] spids: [5642 5658] ) ] ) (command.Simple words: [ {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Running rsync'))} ] more_env: [(env_pair name:V val:{(3)} spids:[5675])] ) (C {(rsync)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:rsync_opts span_id:5695) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } {(DQ ($ Id.VSub_At '$@'))} ) ] ) ) (command.ShFunction name: 'kube::build::sync_to_container' body: (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Syncing sources to container'))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (start_rsyncd_container) } ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (rsync) } {(--delete)} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'H /.git/' span_id:5807))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'- /.make/' span_id:5815))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'- /_tmp/' span_id:5823))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'- /_output/' span_id:5831)) } {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'- /' span_id:5839))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'H zz_generated.*' span_id:5847)) } {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'H generated.proto' span_id:5855))} {(DQ (${ Id.VSub_Name KUBE_ROOT) (/))} {(DQ ('rsync://k8s@') (${ Id.VSub_Name KUBE_RSYNC_ADDR) (/k8s/))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (stop_rsyncd_container) } ) ] ) ) (command.ShFunction name: 'kube::build::copy_output' body: (command.BraceGroup children: [ (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (log) (Id.Lit_Other ':') (Id.Lit_Other ':') (status) } {(DQ ('Syncing out of container'))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (start_rsyncd_container) } ) (C {(local)} {(Id.Lit_VarLike 'rsync_extra=') (DQ )}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: (arith_expr.ArithWord w:{(${ Id.VSub_Name KUBE_VERBOSE)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 6)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:5951) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rsync_extra) op: assign_op.Equal rhs: {(DQ (-iv))} spids: [5956] ) ] ) ] spids: [5937 5953] ) ] ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (rsync) } {(--prune-empty-dirs)} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'- /_temp/' span_id:6015))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ /vendor/' span_id:6023))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ /Godeps/' span_id:6031)) } {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ /staging/***/Godeps/**' span_id:6039)) } {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ /_output/dockerized/bin/**' span_id:6047)) } {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ zz_generated.*' span_id:6055))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ generated.proto' span_id:6063)) } {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ *.pb.go' span_id:6071))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ types.go' span_id:6079)) } {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'+ */' span_id:6087))} {(--filter) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'- /**' span_id:6095))} {(DQ ('rsync://k8s@') (${ Id.VSub_Name KUBE_RSYNC_ADDR) (/k8s/))} {(DQ (${ Id.VSub_Name KUBE_ROOT))} ) (C {(kube) (Id.Lit_Other ':') (Id.Lit_Other ':') (build) (Id.Lit_Other ':') (Id.Lit_Other ':') (stop_rsyncd_container) } ) ] ) ) ] )