Skip to content

Commit

Permalink
test/kokoro: Migrate PSM Interop to Artifact Registry (grpc#7102)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiitk committed Apr 8, 2024
1 parent 490a6fc commit dfd39bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions test/kokoro/psm-security.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ set -eo pipefail
readonly GITHUB_REPOSITORY_NAME="grpc-go"
readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh"
## xDS test server/client Docker images
readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/go-server"
readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/go-client"
readonly DOCKER_REGISTRY="us-docker.pkg.dev"
readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/go-server"
readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/go-client"
readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}"

#######################################
Expand All @@ -39,7 +40,7 @@ build_test_app_docker_images() {
echo "Building Go xDS interop test app Docker images"
docker build -f "${SRC_DIR}/interop/xds/client/Dockerfile" -t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}"
docker build -f "${SRC_DIR}/interop/xds/server/Dockerfile" -t "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}"
gcloud -q auth configure-docker
gcloud -q auth configure-docker "${DOCKER_REGISTRY}"
docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}"
docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}"
if is_version_branch "${TESTING_VERSION}"; then
Expand Down
7 changes: 4 additions & 3 deletions test/kokoro/xds_k8s_lb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ set -eo pipefail
readonly GITHUB_REPOSITORY_NAME="grpc-go"
readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh"
## xDS test server/client Docker images
readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/go-server"
readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/go-client"
readonly DOCKER_REGISTRY="us-docker.pkg.dev"
readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/go-server"
readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/go-client"
readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}"

#######################################
Expand All @@ -39,7 +40,7 @@ build_test_app_docker_images() {
echo "Building Go xDS interop test app Docker images"
docker build -f "${SRC_DIR}/interop/xds/client/Dockerfile" -t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}"
docker build -f "${SRC_DIR}/interop/xds/server/Dockerfile" -t "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}"
gcloud -q auth configure-docker
gcloud -q auth configure-docker "${DOCKER_REGISTRY}"
docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}"
docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}"
if is_version_branch "${TESTING_VERSION}"; then
Expand Down
5 changes: 3 additions & 2 deletions test/kokoro/xds_url_map.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ set -eo pipefail
readonly GITHUB_REPOSITORY_NAME="grpc-go"
readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh"
## xDS test client Docker images
readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/go-client"
readonly DOCKER_REGISTRY="us-docker.pkg.dev"
readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/go-client"
readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}"

#######################################
Expand All @@ -35,7 +36,7 @@ readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}"
build_test_app_docker_images() {
echo "Building Go xDS interop test app Docker images"
docker build -f "${SRC_DIR}/interop/xds/client/Dockerfile" -t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}"
gcloud -q auth configure-docker
gcloud -q auth configure-docker "${DOCKER_REGISTRY}"
docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}"
if is_version_branch "${TESTING_VERSION}"; then
tag_and_push_docker_image "${CLIENT_IMAGE_NAME}" "${GIT_COMMIT}" "${TESTING_VERSION}"
Expand Down

0 comments on commit dfd39bc

Please sign in to comment.