(List (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS errexit]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS nounset]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS pipefail]} ) (If (DBracket {B? LOGICAL_BINARY_AND {B1 UNARY_STRING_n {[DQ [VarSub JENKINS_BUILD_STARTED test_op=VS_TEST_COLON_HYPHEN {}]]}} {B1 UNARY_STRING_n {[DQ [VarSub JENKINS_BUILD_FINISHED test_op=VS_TEST_COLON_HYPHEN {}]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Error: JENKINS_BUILD_STARTED and JENKINS_BUILD_FINISHED should not both be set!"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (If (DBracket {B! {B2 BINARY_STRING_TILDE_EQUAL {[VarSub JENKINS_UPLOAD_TO_GCS test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS y]}]} {[LIT_OTHER "^"] [LIT_DBRACKET_LIKE "["] [LIT_CHARS yY] [LIT_DBRACKET_LIKE "]"] [LIT_OTHER "$"]}}}) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) (= scope= flags=0 words=[] bindings=[('GCS_SUBDIR', {[DQ ]})]) (= scope= flags=2 words=[] bindings=[('remote_git_repo', {[ComSub (AndOr OP_OR_IF (Pipeline (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS --get]} {[LIT_CHARS remote.remote.url]}) (Com {[LIT_CHARS sed]} {[SQ ]}) ) (Com {[LIT_CHARS true]}) )]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub remote_git_repo]]}}) (List (Case to_match={[DQ [VarSub remote_git_repo]]}, pat_word_list=[[{[LIT_CHARS kubernetes/kubernetes]}], [{[LIT_CHARS kubernetes/] [LIT_OTHER "*"]}], [{[LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('GCS_SUBDIR', {[DQ ]})]) (= scope= flags=0 words=[] bindings=[('GCS_SUBDIR', {[DQ [VarSub remote_git_repo transform_ops=[VS_UNARY_POUND {[LIT_CHARS kubernetes] [LIT_SLASH /]}]][LIT_CHARS /]]})]) (= scope= flags=0 words=[] bindings=[('GCS_SUBDIR', {[DQ [VarSub remote_git_repo transform_ops=[PatSub {[\ LIT_ESCAPED_CHAR "\\/"]} {[LIT_CHARS _]}]][LIT_CHARS /]]})]) ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub remote_git_repo]]} {[DQ [LIT_CHARS kubernetes/kubernetes]]}}) (= scope= flags=1 words=[] bindings=[('BUILD_METADATA_REPO', {[DQ [VarSub remote_git_repo]]})]) ) ) ) (If (DBracket {B2 BINARY_STRING_TILDE_EQUAL {[VarSub JOB_NAME]} {[LIT_CHARS -pull-]}}) (List (Com {[LIT_OTHER ":"]} {[VarSub JENKINS_GCS_LOGS_PATH test_op=VS_TEST_COLON_EQUALS {[DQ [LIT_CHARS "gs://kubernetes-jenkins/pr-logs/pull/"][VarSub GCS_SUBDIR][VarSub ghprbPullId test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS unknown]}]]}]} ) (Com {[LIT_OTHER ":"]} {[VarSub JENKINS_GCS_LATEST_PATH test_op=VS_TEST_COLON_EQUALS {[DQ [LIT_CHARS "gs://kubernetes-jenkins/pr-logs/directory"]]}]} ) (Com {[LIT_OTHER ":"]} {[VarSub JENKINS_GCS_LOGS_INDIRECT test_op=VS_TEST_COLON_EQUALS {[DQ [LIT_CHARS "gs://kubernetes-jenkins/pr-logs/directory/"][VarSub JOB_NAME]]}]} ) ) (ElseTrue) (List (Com {[LIT_OTHER ":"]} {[VarSub JENKINS_GCS_LOGS_PATH test_op=VS_TEST_COLON_EQUALS {[DQ [LIT_CHARS "gs://kubernetes-jenkins/logs"]]}]} ) (Com {[LIT_OTHER ":"]} {[VarSub JENKINS_GCS_LATEST_PATH test_op=VS_TEST_COLON_EQUALS {[DQ [LIT_CHARS "gs://kubernetes-jenkins/logs"]]}]} ) (Com {[LIT_OTHER ":"]} {[VarSub JENKINS_GCS_LOGS_INDIRECT test_op=VS_TEST_COLON_EQUALS {[DQ ]}]} ) ) ) (= scope= flags=2 words=[] bindings=[('artifacts_path', {[DQ [VarSub WORKSPACE][LIT_CHARS /_artifacts]]})]) (= scope= flags=2 words=[] bindings=[('gcs_job_path', {[DQ [VarSub JENKINS_GCS_LOGS_PATH][LIT_CHARS /][VarSub JOB_NAME]]})]) (= scope= flags=2 words=[] bindings=[('gcs_build_path', {[DQ [VarSub gcs_job_path][LIT_CHARS /][VarSub BUILD_NUMBER]]})]) (= scope= flags=2 words=[] bindings=[('gcs_latest_path', {[DQ [VarSub JENKINS_GCS_LATEST_PATH][LIT_CHARS /][VarSub JOB_NAME]]})]) (= scope= flags=2 words=[] bindings=[('gcs_indirect_path', {[DQ [VarSub JENKINS_GCS_LOGS_INDIRECT]]})]) (= scope= flags=2 words=[] bindings=[('gcs_acl', {[DQ [LIT_CHARS public-read]]})]) (= scope= flags=2 words=[] bindings=[('results_url', {[VarSub gcs_build_path transform_ops=[PatSub {[DQ [LIT_CHARS "gs:/"]]} {[DQ [LIT_CHARS "https://console.cloud.google.com/storage/browser"]]} do_all]]})]) (= scope= flags=2 words=[] bindings=[('timestamp', {[ComSub (Com {[LIT_CHARS date]} {[LIT_OTHER "+"] [LIT_OTHER "%"] [LIT_CHARS s]})]})]) (FunctionDef set_kubernetes_base_path [] (For kubernetes_base_path [{[LIT_CHARS kubernetes]}, {[LIT_CHARS go/src/k8s.io/kubernetes]}, {[LIT_CHARS .]}]) (AndOr OP_AND_IF (DBracket {B1 UNARY_FILE_f {[VarSub kubernetes_base_path] [LIT_CHARS /cluster/common.sh]}}) (Com {[LIT_CHARS break]} ) ) ) ) (FunctionDef find_version [] (Subshell (List (Com {[LIT_CHARS set_kubernetes_base_path]} ) (Com {[LIT_CHARS cd]} {[VarSub kubernetes_base_path]} ) (If (DBracket {B1 UNARY_FILE_e {[DQ [LIT_CHARS version]]}}) (Com {[LIT_CHARS cat]} {[LIT_CHARS version]} ) (DBracket {B1 UNARY_FILE_e {[DQ [LIT_CHARS hack/lib/version.sh]]}}) (List (= scope= flags=1 words=[] bindings=[('KUBE_ROOT', {[DQ [LIT_CHARS .]]})]) (Com {[LIT_CHARS source]} {[DQ [LIT_CHARS hack/lib/version.sh]]} ) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS version] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS get_version_vars]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub KUBE_GIT_VERSION test_op=VS_TEST_HYPHEN {}]]} ) ) (ElseTrue) (Pipeline (Com {[LIT_CHARS gsutil]} {[LIT_CHARS cat]} {[VarSub gcs_build_path] [LIT_CHARS /started.json]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) (Com {[LIT_CHARS sed]} {[LIT_CHARS -n]} {[SQ ]} ) ) ) ) ) ) (FunctionDef print_started [] (List (= scope= flags=0 words=[] bindings=[('metadata_keys', {[ComSub (Pipeline (Com {[LIT_CHARS compgen]} {[LIT_CHARS -e]}) (Com {[LIT_CHARS grep]} {[LIT_OTHER "^"] [LIT_CHARS BUILD_METADATA_]}) )]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "{"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS version][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][\ LIT_ESCAPED_CHAR "\\\""][VarSub version][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ","]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS timestamp][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][VarSub timestamp][LIT_CHARS ","]]} ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub metadata_keys]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS metadata][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": {"]]} ) (= scope= flags=0 words=[] bindings=[('sep', {[DQ ]})]) (For env_var [{[VarSub metadata_keys]}]) (List (= scope= flags=0 words=[] bindings=[('var_upper', {[DQ [VarSub env_var transform_ops=[VS_UNARY_POUND {[LIT_CHARS BUILD_METADATA_]}]]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][VarSub sep][\ LIT_ESCAPED_CHAR "\\\""][VarSub var_upper transform_ops=[VS_UNARY_DCOMMA {}]][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][\ LIT_ESCAPED_CHAR "\\\""][VarSub env_var transform_ops=[(!ref)]][\ LIT_ESCAPED_CHAR "\\\""]]} ) (= scope= flags=0 words=[] bindings=[('sep', {[DQ [LIT_CHARS ","]]})]) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " },"]]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS jenkins-node][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][\ LIT_ESCAPED_CHAR "\\\""][VarSub NODE_NAME test_op=VS_TEST_COLON_HYPHEN {}][\ LIT_ESCAPED_CHAR "\\\""]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "}"]]} ) ) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub TEST_STARTED_JSON test_op=VS_TEST_COLON_HYPHEN {}]]}}) (List (= scope= flags=0 words=[] bindings=[('version', {[ComSub (Com {[LIT_CHARS find_version]})]})]) (Pipeline (Com {[LIT_CHARS cat]} {[ComSub (Com {[LIT_CHARS print_started]})]} ) (Com {[LIT_CHARS jq]} {[LIT_CHARS .]} ) ) (Com {[LIT_CHARS exit]} ) ) ) (FunctionDef upload_version [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('version', {[ComSub (Com {[LIT_CHARS find_version]})]})]) (= scope= flags=0 words=[{[LIT_CHARS upload_attempt]}] bindings=[]) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[SQ ]} ) (Com {[LIT_CHARS date]} {[LIT_CHARS -d]} {[DQ [LIT_CHARS "@"][VarSub timestamp]]} ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub version]]}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Found Kubernetes version: "][VarSub version]]} ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Could not find Kubernetes version"]]} ) ) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('json_file', {[DQ [VarSub gcs_build_path][LIT_CHARS /started.json]]})]) (For upload_attempt [{[LIT_LBRACE "{"] [LIT_CHARS 1..3] [LIT_RBRACE "}"]}]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Uploading version to: "][VarSub json_file][LIT_CHARS " (attempt "][VarSub upload_attempt][LIT_CHARS ")"]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Content-Type:application/json"]]} {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[ComSub (Com {[LIT_CHARS print_started]})]} {[DQ [VarSub json_file]]} ) (Com {[LIT_CHARS continue]} ) ) (Com {[LIT_CHARS break]} ) ) ) ) ) (FunctionDef update_job_result_cache [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('build_result', {[VarSub 1]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('version', {[ComSub (Com {[LIT_CHARS find_version]})]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('job_results', {[VarSub gcs_job_path] [LIT_CHARS /jobResultsCache.json]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('tmp_results', {[DQ [VarSub WORKSPACE][LIT_CHARS /_tmp/jobResultsCache.tmp]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('cache_size', {[LIT_CHARS 300]})]) (= scope= flags=0 words=[{[LIT_CHARS upload_attempt]}] bindings=[]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub version]]}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Found Kubernetes version: "][VarSub version]]} ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Could not find Kubernetes version"]]} ) ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[VarSub tmp_results transform_ops=[VS_UNARY_PERCENT {[LIT_SLASH /] [LIT_CHARS "*"]}]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "["]]} < (FilenameRedirectNode filename={[VarSub tmp_results]} "> 1), > ) (For upload_attempt [{[ComSub (Com {[LIT_CHARS seq]} {[LIT_CHARS 3]})]}]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Copying "][VarSub job_results][LIT_CHARS " to "][VarSub tmp_results][LIT_CHARS " (attempt "][VarSub upload_attempt][LIT_CHARS ")"]]} ) (AndOr OP_OR_IF (Pipeline (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS cat]} {[VarSub job_results]} < (DescriptorRedirectNode target={[LIT_CHARS -]} &"> 2), > ) (Com {[LIT_CHARS sed]} {[LIT_CHARS -n]} {[SQ ]} ) (Com {[LIT_CHARS tail]} {[LIT_CHARS -] [VarSub cache_size]} < (FilenameRedirectNode filename={[VarSub tmp_results]} >"> 1), > ) ) (Com {[LIT_CHARS continue]} ) ) (Com {[LIT_CHARS break]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "{"][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS version][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][\ LIT_ESCAPED_CHAR "\\\""][VarSub version][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ", "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS buildnumber][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][\ LIT_ESCAPED_CHAR "\\\""][VarSub BUILD_NUMBER][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ","]]} {[DQ [\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS result][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][\ LIT_ESCAPED_CHAR "\\\""][VarSub build_result][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "}"]]} < (FilenameRedirectNode filename={[VarSub tmp_results]} >"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "]"]]} < (FilenameRedirectNode filename={[VarSub tmp_results]} >"> 1), > ) (For upload_attempt [{[ComSub (Com {[LIT_CHARS seq]} {[LIT_CHARS 3]})]}]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Copying "][VarSub tmp_results][LIT_CHARS " to "][VarSub job_results][LIT_CHARS " (attempt "][VarSub upload_attempt][LIT_CHARS ")"]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Content-Type:application/json"]]} {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[VarSub tmp_results]} {[VarSub job_results]} ) (Com {[LIT_CHARS continue]} ) ) (Com {[LIT_CHARS break]} ) ) ) (Com {[LIT_CHARS rm]} {[LIT_CHARS -f]} {[VarSub tmp_results]} ) ) ) (FunctionDef upload_artifacts_and_build_result [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('build_result', {[VarSub 1]})]) (= scope= flags=0 words=[{[LIT_CHARS upload_attempt]}] bindings=[]) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[SQ ]} ) (Com {[LIT_CHARS date]} {[LIT_CHARS -d]} {[DQ [LIT_CHARS "@"][VarSub timestamp]]} ) (For upload_attempt [{[LIT_LBRACE "{"] [LIT_CHARS 1..3] [LIT_RBRACE "}"]}]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Uploading to "][VarSub gcs_build_path][LIT_CHARS " (attempt "][VarSub upload_attempt][LIT_CHARS ")"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Uploading build result: "][VarSub build_result]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Content-Type:application/json"]]} {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[ComSub (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "{"]]}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS result][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][\ LIT_ESCAPED_CHAR "\\\""][VarSub build_result][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ","]]}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS timestamp][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS ": "][VarSub timestamp]]}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "}"]]}) )]} {[DQ [VarSub gcs_build_path][LIT_CHARS /finished.json]]} ) (Com {[LIT_CHARS continue]} ) ) (If (DBracket {B? LOGICAL_BINARY_AND {B1 UNARY_FILE_d {[DQ [VarSub artifacts_path]]}} {B1 UNARY_STRING_n {[ComSub (Com {[LIT_CHARS ls]} {[LIT_CHARS -A]} {[DQ [VarSub artifacts_path]]})]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Uploading artifacts"]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -m]} {[LIT_CHARS -q]} {[LIT_CHARS -o]} {[DQ [LIT_CHARS "GSUtil:use_magicfile=True"]]} {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[LIT_CHARS -r]} {[LIT_CHARS -c]} {[LIT_CHARS -z]} {[LIT_CHARS log] [LIT_COMMA ","] [LIT_CHARS txt] [LIT_COMMA ","] [LIT_CHARS xml]} {[DQ [VarSub artifacts_path]]} {[DQ [VarSub gcs_build_path][LIT_CHARS /artifacts]]} ) (Com {[LIT_CHARS continue]} ) ) ) ) (If (DBracket {B1 UNARY_FILE_e {[DQ [VarSub WORKSPACE][LIT_CHARS /build-log.txt]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Uploading build log"]]} ) (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS cp]} {[LIT_CHARS -Z]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[DQ [VarSub WORKSPACE][LIT_CHARS /build-log.txt]]} {[DQ [VarSub gcs_build_path]]} ) ) ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub gcs_indirect_path]]} {[DQ ]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Writing "][VarSub gcs_build_path][LIT_CHARS " to "][VarSub gcs_indirect_path][LIT_CHARS /][VarSub BUILD_NUMBER][LIT_CHARS .txt]]} ) (AndOr OP_OR_IF (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub gcs_build_path]]} ) (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Content-Type:text/plain"]]} {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[LIT_CHARS -]} {[DQ [VarSub gcs_indirect_path][LIT_CHARS /][VarSub BUILD_NUMBER][LIT_CHARS .txt]]} ) ) (Com {[LIT_CHARS continue]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Marking build "][VarSub BUILD_NUMBER][LIT_CHARS " as the latest completed build for this PR"]]} ) (AndOr OP_OR_IF (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub BUILD_NUMBER]]} ) (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Content-Type:text/plain"]]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Cache-Control:private, max-age=0, no-transform"]]} {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[LIT_CHARS -]} {[DQ [VarSub gcs_job_path][LIT_CHARS /latest-build.txt]]} ) ) (Com {[LIT_CHARS continue]} ) ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Marking build "][VarSub BUILD_NUMBER][LIT_CHARS " as the latest completed build"]]} ) (AndOr OP_OR_IF (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub BUILD_NUMBER]]} ) (Com {[LIT_CHARS gsutil]} {[LIT_CHARS -q]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Content-Type:text/plain"]]} {[LIT_CHARS -h]} {[DQ [LIT_CHARS "Cache-Control:private, max-age=0, no-transform"]]} {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub gcs_acl]]} {[LIT_CHARS -]} {[DQ [VarSub gcs_latest_path][LIT_CHARS /latest-build.txt]]} ) ) (Com {[LIT_CHARS continue]} ) ) (Com {[LIT_CHARS break]} ) ) ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\n"][\ LIT_ESCAPED_CHAR "\\n"][\ LIT_ESCAPED_CHAR "\\n"][LIT_CHARS "*** View logs and artifacts at "][VarSub results_url][LIT_CHARS " ***"][\ LIT_ESCAPED_CHAR "\\n"][\ LIT_ESCAPED_CHAR "\\n"]]} ) ) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub JENKINS_BUILD_STARTED test_op=VS_TEST_COLON_HYPHEN {}]]}}) (Com {[LIT_CHARS upload_version]} ) (DBracket {B1 UNARY_STRING_n {[DQ [VarSub JENKINS_BUILD_FINISHED test_op=VS_TEST_COLON_HYPHEN {}]]}}) (List (Com {[LIT_CHARS upload_artifacts_and_build_result]} {[VarSub JENKINS_BUILD_FINISHED]} ) (Com {[LIT_CHARS update_job_result_cache]} {[VarSub JENKINS_BUILD_FINISHED]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Called without JENKINS_BUILD_STARTED or JENKINS_BUILD_FINISHED set."]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Assuming a legacy invocation."]]} ) (Com {[LIT_CHARS upload_artifacts_and_build_result]} {[DQ [LIT_CHARS "[UNSET]"]]} ) ) ) )