Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c9b5d10

Browse files
author
Takashi Matsuo
committed
use --entrypoint instead of giving the command
1 parent 33e4ae9 commit c9b5d10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.kokoro/trampoline_v2.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,15 +306,17 @@ done
306306
if [[ $# -ge 1 ]]; then
307307
log_yellow "Running the given commands '" "${@:1}" "' in the container."
308308
readonly commands=("${@:1}")
309+
echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
310+
docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
309311
else
310312
log_yellow "Running the tests in a Docker container."
311313
# Temporary workaround to remove unnecessary prefix.
312314
real_build_file=${TRAMPOLINE_BUILD_FILE#"github/python-docs-samples/"}
313-
readonly commands=("/v/${real_build_file}")
315+
docker_flags+=("--entrypoint=${real_build_file}")
316+
echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}"
317+
docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}"
314318
fi
315319

316-
echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
317-
docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
318320

319321
test_retval=$?
320322

0 commit comments

Comments
 (0)