File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,6 +230,9 @@ if [[ "${TRAMPOLINE_IMAGE_SOURCE:-none}" != "none" ]]; then
230230 fi
231231
232232 log_yellow " Start building the docker image."
233+ if [[ " ${TRAMPOLINE_SHOW_COMMAND:- false} " == " true" ]]; then
234+ echo " docker build" " ${docker_build_flags[@]} " " ${context_dir} "
235+ fi
233236 if docker build " ${docker_build_flags[@]} " " ${context_dir} " ; then
234237 log_green " Finished building the docker image."
235238 update_cache=" true"
@@ -306,14 +309,18 @@ done
306309if [[ $# -ge 1 ]]; then
307310 log_yellow " Running the given commands '" " ${@: 1} " " ' in the container."
308311 readonly commands=(" ${@: 1} " )
309- echo docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} " " ${commands[@]} "
312+ if [[ " ${TRAMPOLINE_SHOW_COMMAND:- false} " == " true" ]]; then
313+ echo docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} " " ${commands[@]} "
314+ fi
310315 docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} " " ${commands[@]} "
311316else
312317 log_yellow " Running the tests in a Docker container."
313318 # Temporary workaround to remove unnecessary prefix.
314319 real_build_file=${TRAMPOLINE_BUILD_FILE# " github/python-docs-samples/" }
315320 docker_flags+=(" --entrypoint=${real_build_file} " )
316- echo docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} "
321+ if [[ " ${TRAMPOLINE_SHOW_COMMAND:- false} " == " true" ]]; then
322+ echo docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} "
323+ fi
317324 docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} "
318325fi
319326
Original file line number Diff line number Diff line change 6060if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then
6161 TRAMPOLINE_IMAGE_UPLOAD="false"
6262fi
63+
64+ if [[ -z "${TRAMPOLINE_SHOW_COMMAND:-}" ]]; then
65+ # We are sure there's no secrets in the command line in docker
66+ # bulid and docker run commands.
67+ TRAMPOLINE_SHOW_COMMAND="true"
68+ fi
You can’t perform that action at this time.
0 commit comments