File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,9 @@ if [[ "${TRAMPOLINE_IMAGE_SOURCE:-none}" != "none" ]]; then
230
230
fi
231
231
232
232
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
233
236
if docker build " ${docker_build_flags[@]} " " ${context_dir} " ; then
234
237
log_green " Finished building the docker image."
235
238
update_cache=" true"
@@ -306,14 +309,18 @@ done
306
309
if [[ $# -ge 1 ]]; then
307
310
log_yellow " Running the given commands '" " ${@: 1} " " ' in the container."
308
311
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
310
315
docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} " " ${commands[@]} "
311
316
else
312
317
log_yellow " Running the tests in a Docker container."
313
318
# Temporary workaround to remove unnecessary prefix.
314
319
real_build_file=${TRAMPOLINE_BUILD_FILE# " github/python-docs-samples/" }
315
320
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
317
324
docker run " ${docker_flags[@]} " " ${TRAMPOLINE_IMAGE} "
318
325
fi
319
326
Original file line number Diff line number Diff line change 60
60
if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then
61
61
TRAMPOLINE_IMAGE_UPLOAD="false"
62
62
fi
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