rshamunov commented on code in PR #25117: URL: https://github.com/apache/beam/pull/25117#discussion_r1158556631
########## playground/infrastructure/cloudbuild/examples_cd.sh: ########## @@ -0,0 +1,119 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This loop reads the arguments passed to the script, parses them, and exports them as environment variables. +for ARGUMENT in "$@" +do + KEY=$(echo $ARGUMENT | cut -f1 -d=) + + KEY_LENGTH=${#KEY} + VALUE="${ARGUMENT:$KEY_LENGTH+1}" + export "$KEY"="$VALUE" +done + +# This block sets default values for several environment variables to run CD script. +export LOG_PATH=${LOG_PATH-"/dev/null"} +export ORIGIN=${ORIGIN-"PG_EXAMPLES"} +export STEP=${STEP-"CD"} +export SUBDIRS=${SUBDIRS-"./learning/katas ./examples ./sdks"} +export BEAM_ROOT_DIR=${BEAM_ROOT_DIR-"/workspace/beam"} +export PROJECT_ID=${PROJECT_ID} Review Comment: We clean up environment variables when we call the script -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
