1*cc02d7e2SAndroid Build Coastguard Worker#!/usr/bin/env bash 2*cc02d7e2SAndroid Build Coastguard Worker# Copyright 2024 gRPC authors. 3*cc02d7e2SAndroid Build Coastguard Worker# 4*cc02d7e2SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 5*cc02d7e2SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 6*cc02d7e2SAndroid Build Coastguard Worker# You may obtain a copy of the License at 7*cc02d7e2SAndroid Build Coastguard Worker# 8*cc02d7e2SAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 9*cc02d7e2SAndroid Build Coastguard Worker# 10*cc02d7e2SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 11*cc02d7e2SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 12*cc02d7e2SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*cc02d7e2SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 14*cc02d7e2SAndroid Build Coastguard Worker# limitations under the License. 15*cc02d7e2SAndroid Build Coastguard Workerset -eo pipefail 16*cc02d7e2SAndroid Build Coastguard Worker 17*cc02d7e2SAndroid Build Coastguard Worker####################################### 18*cc02d7e2SAndroid Build Coastguard Worker# Builds test app Docker images and pushes them to GCR. 19*cc02d7e2SAndroid Build Coastguard Worker# Called from psm_interop_kokoro_lib.sh. 20*cc02d7e2SAndroid Build Coastguard Worker# 21*cc02d7e2SAndroid Build Coastguard Worker# Globals: 22*cc02d7e2SAndroid Build Coastguard Worker# SRC_DIR: Absolute path to the source repo on Kokoro VM 23*cc02d7e2SAndroid Build Coastguard Worker# SERVER_IMAGE_NAME: Test server Docker image name 24*cc02d7e2SAndroid Build Coastguard Worker# CLIENT_IMAGE_NAME: Test client Docker image name 25*cc02d7e2SAndroid Build Coastguard Worker# GIT_COMMIT: SHA-1 of git commit being built 26*cc02d7e2SAndroid Build Coastguard Worker# DOCKER_REGISTRY: Docker registry to push to 27*cc02d7e2SAndroid Build Coastguard Worker# Outputs: 28*cc02d7e2SAndroid Build Coastguard Worker# Writes the output of docker image build stdout, stderr 29*cc02d7e2SAndroid Build Coastguard Worker####################################### 30*cc02d7e2SAndroid Build Coastguard Workerpsm::lang::build_docker_images() { 31*cc02d7e2SAndroid Build Coastguard Worker local client_dockerfile="src/python/grpcio_tests/tests_py3_only/interop/Dockerfile.client" 32*cc02d7e2SAndroid Build Coastguard Worker local server_dockerfile="src/python/grpcio_tests/tests_py3_only/interop/Dockerfile.server" 33*cc02d7e2SAndroid Build Coastguard Worker psm::build::docker_images_generic "${client_dockerfile}" "${server_dockerfile}" 34*cc02d7e2SAndroid Build Coastguard Worker} 35