(CommandList children: [ (C {(set)} {(-o)} {(errexit)}) (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:TASK) op:Equal rhs:{($ VSub_Number '$1')} spids:[63])] spids: [63] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:IMAGE) op:Equal rhs:{($ VSub_Number '$2')} spids:[66])] spids: [66] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_ROOT) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})] ) left_token: <Left_CommandSub '$('> spids: [76 84] ) (/../..) ) } ) (C {(pwd)} {(-P)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub '$('> spids: [72 93] ) ) } spids: [70] ) ] spids: [70] ) (Assignment keyword: Assign_Declare flags: [-A] pairs: [ (assign_pair lhs: (LhsName name:QEMUARCHS) op: Equal rhs: { (ArrayLiteralPart words: [ {(Lit_Other '[') (DQ (amd64)) (Lit_Other ']') (Lit_Other '=') (DQ (x86_64))} {(Lit_Other '[') (DQ (arm)) (Lit_Other ']') (Lit_Other '=') (DQ (arm))} {(Lit_Other '[') (DQ (arm64)) (Lit_Other ']') (Lit_Other '=') (DQ (aarch64))} {(Lit_Other '[') (DQ (ppc64le)) (Lit_Other ']') (Lit_Other '=') (DQ (ppc64le))} {(Lit_Other '[') (DQ (s390x)) (Lit_Other ']') (Lit_Other '=') (DQ (s390x))} ] ) } spids: [104] ) ] spids: [100] ) (FuncDef name: listArchs body: (BraceGroup children: [(C {(cut)} {(-d)} {(DQ ('='))} {(-f)} {(1)} {(${ VSub_Name IMAGE) (/BASEIMAGE)})] spids: [167] ) spids: [163 166] ) (FuncDef name: getBaseImage body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:arch) op: Equal rhs: {($ VSub_Number '$1')} spids: [200] ) ] spids: [200] ) (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(DQ (${ VSub_Name arch) ('='))} {(BASEIMAGE)}) (C {(cut)} {(-d) (Lit_Other '=')} {(-f2)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [206 226] ) } ) ] spids: [197] ) spids: [193 196] ) (FuncDef name: build body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_f child:{(${ VSub_Name IMAGE) (/BASEIMAGE)}) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:archs) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(listArchs)})]) left_token: <Left_CommandSub '$('> spids: [268 270] ) } spids: [267] ) ] spids: [267] ) ] spids: [16777215 264] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:archs) op: Equal rhs: { (BracedVarSub token: <VSub_Name QEMUARCHS> prefix_op: VSub_Bang bracket_op: (WholeArray op_id:Lit_At) spids: [277 283] ) } spids: [276] ) ] spids: [276] ) ] spids: [273 286] ) (ForEach iter_name: arch iter_words: [{(${ VSub_Name archs)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} { (DQ ('Building image for ') (${ VSub_Name IMAGE) (' ARCH: ') (${ VSub_Name arch) (...) ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:temp_dir) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(mktemp)} {(-d)})]) left_token: <Left_CommandSub '$('> spids: [329 333] ) } spids: [328] ) ] spids: [328] ) (C {(cp)} {(-r)} {(${ VSub_Name IMAGE) (/) (Lit_Other '*')} {(${ VSub_Name temp_dir)}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_f child: {(${ VSub_Name IMAGE) (/Makefile)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(make)} {(-C)} {(${ VSub_Name IMAGE)} {(bin)} {(Lit_VarLike 'ARCH=') (${ VSub_Name arch)} {(Lit_VarLike 'TARGET=') (${ VSub_Name temp_dir)} ) ] spids: [16777215 365] ) ] spids: [16777215 397] ) (C {(pushd)} {(${ VSub_Name temp_dir)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TAG) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(VERSION)} spids: [413] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [412 415] ) } spids: [411] ) ] spids: [411] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_f child:{(BASEIMAGE)})) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASEIMAGE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(getBaseImage)} {(${ VSub_Name arch)})] ) left_token: <Left_CommandSub '$('> spids: [434 440] ) } spids: [433] ) ] spids: [433] ) (C {(sed)} {(-i)} {(DQ ('s|BASEIMAGE|') (${ VSub_Name BASEIMAGE) ('|g'))} {(Dockerfile)} ) ] spids: [16777215 430] ) ] spids: [16777215 458] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (WordTest w: { (CommandSubPart command_list: (CommandList children: [ (C {(grep)} {(DQ (CROSS_BUILD_))} {(Dockerfile)}) ] ) left_token: <Left_CommandSub '$('> spids: [470 478] ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ (${ VSub_Name arch))} right: {(DQ (amd64))} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(sed)} {(-i)} {(DQ (/CROSS_BUILD_/d))} {(Dockerfile)})] spids: [16777215 505] ) ] else_action: [ (C {(sed)} {(-i)} { (DQ ('s|QEMUARCH|') (BracedVarSub token: <VSub_Name QEMUARCHS> bracket_op: (ArrayIndex expr: (ArithWord w:{($ VSub_Name '$arch')}) ) spids: [528 533] ) ('|g') ) } {(Dockerfile)} ) (C {(docker)} {(run)} {(--rm)} {(--privileged)} {(multiarch/qemu-user-static) (Lit_Other ':') (register)} {(--reset)} ) (Pipeline children: [ (C {(curl)} {(-sSL)} {(https) (Lit_Other ':') ( //github.com/multiarch/qemu-user-static/releases/download/ ) (${ VSub_Name QEMUVERSION) (/x86_64_qemu-) (BracedVarSub token: <VSub_Name QEMUARCHS> bracket_op: (ArrayIndex expr: (ArithWord w:{($ VSub_Name '$arch')}) ) spids: [570 575] ) (-static.tar.gz) } ) (C {(tar)} {(-xz)} {(-C)} {(${ VSub_Name temp_dir)}) ] negated: False ) (C {(sed)} {(-i)} {(DQ (s/CROSS_BUILD_//g))} {(Dockerfile)}) ] spids: [519 602] ) ] spids: [16777215 483] ) ] spids: [16777215 605] ) (C {(docker)} {(build)} {(--pull)} {(-t)} {(${ VSub_Name REGISTRY) (/) (${ VSub_Name IMAGE) (-) (${ VSub_Name arch) (Lit_Other ':') (${ VSub_Name TAG) } {(.)} ) (C {(popd)}) ] spids: [301 640] ) spids: [295 299] ) ] spids: [247] ) spids: [243 246] ) (FuncDef name: push body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_f child:{(${ VSub_Name IMAGE) (/BASEIMAGE)}) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:archs) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(listArchs)})]) left_token: <Left_CommandSub '$('> spids: [673 675] ) } spids: [672] ) ] spids: [672] ) ] spids: [16777215 669] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:archs) op: Equal rhs: { (BracedVarSub token: <VSub_Name QEMUARCHS> prefix_op: VSub_Bang bracket_op: (WholeArray op_id:Lit_At) spids: [682 688] ) } spids: [681] ) ] spids: [681] ) ] spids: [678 691] ) (ForEach iter_name: arch iter_words: [{(${ VSub_Name archs)}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TAG) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(${ VSub_Name IMAGE) (/VERSION)} spids: [710] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [709 715] ) } spids: [708] ) ] spids: [708] ) (C {(gcloud)} {(docker)} {(--)} {(push)} {(${ VSub_Name REGISTRY) (/) (${ VSub_Name IMAGE) (-) (${ VSub_Name arch) (Lit_Other ':') (${ VSub_Name TAG) } ) ] spids: [705 743] ) spids: [699 703] ) ] spids: [652] ) spids: [648 651] ) (FuncDef name: bin body: (BraceGroup children: [ (ForEach iter_name: SRC iter_words: [{($ VSub_At '$@')}] do_arg_iter: False body: (DoGroup children: [ (C {(docker)} {(run)} {(--rm)} {(-it)} {(-v)} {(${ VSub_Name TARGET) (Lit_Other ':') (${ VSub_Name TARGET) (Lit_Other ':') (Z)} {(-v)} {(${ VSub_Name KUBE_ROOT) (Lit_Other ':') (/go/src/k8s.io/kubernetes) (Lit_Other ':') (Z)} {(golang) (Lit_Other ':') (${ VSub_Name GOLANG_VERSION)} {(/bin/bash)} {(-c)} { (DQ (' cd /go/src/k8s.io/kubernetes/test/images/') (${ VSub_Name SRC_DIR) (' && ') (' CGO_ENABLED=0 GOARM=') (${ VSub_Name GOARM) (' GOARCH=') (${ VSub_Name ARCH) (" go build -a -installsuffix cgo --ldflags '-w' -o ") (${ VSub_Name TARGET) (/) (${ VSub_Name SRC) (' ./') (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(${ VSub_Name SRC)})] ) left_token: <Left_CommandSub '$('> spids: [840 846] ) ) } ) ] spids: [768 850] ) spids: [763 765] ) ] spids: [755] ) spids: [751 754] ) (C {(shift)}) (C {(eval)} {(${ VSub_Name TASK)} {(DQ ($ VSub_At '$@'))}) ] )