Skip to content

Commit 4db0cd2

Browse files
committed
xDS k8s tests: fix docker auth error in the build scripts
Docker auth needed to be done before pushing thats to the GCR. Also add missing versioned image tagging to xds_k8s_url_map.sh.
1 parent 3be7563 commit 4db0cd2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎packages/grpc-js-xds/scripts/xds_k8s_lb.sh‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ readonly LANGUAGE_NAME="Node"
3131
# BUILD_APP_PATH
3232
# CLIENT_IMAGE_NAME: Test client Docker image name
3333
# GIT_COMMIT: SHA-1 of git commit being built
34+
# TESTING_VERSION: version branch under test, f.e. v1.42.x, master
3435
# Arguments:
3536
# None
3637
# Outputs:
@@ -45,15 +46,12 @@ build_test_app_docker_images() {
4546
-t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" \
4647
.
4748

49+
gcloud -q auth configure-docker
50+
docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}"
4851
if is_version_branch "${TESTING_VERSION}"; then
4952
tag_and_push_docker_image "${CLIENT_IMAGE_NAME}" "${GIT_COMMIT}" "${TESTING_VERSION}"
5053
fi
51-
5254
popd
53-
54-
gcloud -q auth configure-docker
55-
56-
docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}"
5755
}
5856

5957
#######################################

‎packages/grpc-js-xds/scripts/xds_k8s_url_map.sh‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ readonly LANGUAGE_NAME="Node"
3030
# BUILD_APP_PATH
3131
# CLIENT_IMAGE_NAME: Test client Docker image name
3232
# GIT_COMMIT: SHA-1 of git commit being built
33+
# TESTING_VERSION: version branch under test, f.e. v1.42.x, master
3334
# Arguments:
3435
# None
3536
# Outputs:
@@ -44,11 +45,12 @@ build_test_app_docker_images() {
4445
-t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" \
4546
.
4647

47-
popd
48-
4948
gcloud -q auth configure-docker
50-
5149
docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}"
50+
if is_version_branch "${TESTING_VERSION}"; then
51+
tag_and_push_docker_image "${CLIENT_IMAGE_NAME}" "${GIT_COMMIT}" "${TESTING_VERSION}"
52+
fi
53+
popd
5254
}
5355

5456
#######################################

0 commit comments

Comments
 (0)