diff --git a/tools/gce_setup/private_build_and_test.sh b/tools/gce_setup/private_build_and_test.sh index bab27b5fa31..9c5c347a304 100755 --- a/tools/gce_setup/private_build_and_test.sh +++ b/tools/gce_setup/private_build_and_test.sh @@ -15,12 +15,15 @@ LANGUAGE=$1 ENV=$2 TEST=$3 GIT=$4 -SERVER=${5:-"grpc-docker-server"} +PROJECT=${5:-"stoked-keyword-656"} +ZONE=${6:-"asia-east1-a"} +CLIENT=${7:-"grpc-docker-testclients1"} +SERVER=${8:-"grpc-docker-server"} current_time=$(date "+%Y-%m-%d-%H-%M-%S") result_file_name=private_result.$current_time.txt -sudo docker run --name="private_images" -v $4:/var/local/git-clone grpc/$1 /var/local/git-clone/grpc/tools/dockerfile/grpc_$1/build.sh +sudo docker run --name="private_images" -v $GIT:/var/local/git-clone grpc/$LANGUAGE /var/local/git-clone/grpc/tools/dockerfile/grpc_$LANGUAGE/build.sh sudo docker commit -m "private image" -a $USER private_images grpc/private_images @@ -32,27 +35,27 @@ sudo docker rmi -f grpc/private_images sudo docker rm private_images -gcloud compute --project "stoked-keyword-656" ssh --zone "asia-east1-a" "grpc-docker-testclients1" --command "sudo docker pull 0.0.0.0:5000/grpc/private_images" +gcloud compute --project $PROJECT ssh --zone $ZONE $CLIENT --command "sudo docker pull 0.0.0.0:5000/grpc/private_images" -gcloud compute --project "stoked-keyword-656" ssh --zone "asia-east1-a" "grpc-docker-testclients1" --command "sudo docker tag 0.0.0.0:5000/grpc/private_images grpc/$1" +gcloud compute --project $PROJECT ssh --zone $ZONE $CLIENT --command "sudo docker tag 0.0.0.0:5000/grpc/private_images grpc/$LANGUAGE" source grpc_docker.sh if [ $ENV == 'interop' ] then - grpc_interop_test $TEST grpc-docker-testclients1 $LANGUAGE $SERVER cxx - grpc_interop_test $TEST grpc-docker-testclients1 $LANGUAGE $SERVER java - grpc_interop_test $TEST grpc-docker-testclients1 $LANGUAGE $SERVER go - grpc_interop_test $TEST grpc-docker-testclients1 $LANGUAGE $SERVER ruby - grpc_interop_test $TEST grpc-docker-testclients1 $LANGUAGE $SERVER node - grpc_interop_test $TEST grpc-docker-testclients1 $LANGUAGE $SERVER python + grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER cxx + grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER java + grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER go + grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER ruby + grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER node + grpc_interop_test $TEST $CLIENT $LANGUAGE $SERVER python else if [ $ENV == 'cloud' ] then - grpc_cloud_prod_test $TEST grpc-docker-testclients1 $LANGUAGE > /tmp/$result_file_name 2>&1 - gsutil cp /tmp/$result_file_name gs://stoked-keyword-656-output/private_result/$result_file_name + grpc_cloud_prod_test $TEST $CLIENT $LANGUAGE > /tmp/$result_file_name 2>&1 + gsutil cp /tmp/$result_file_name gs://$PROJECT-output/private_result/$result_file_name else - grpc_cloud_prod_test $TEST grpc-docker-testclients1 $LANGUAGE + grpc_cloud_prod_auth_test $TEST $CLIENT $LANGUAGE fi fi