Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89efc9f

Browse filesBrowse files
author
Takashi Matsuo
committed
do not show the docker commands by default
1 parent bac8348 commit 89efc9f
Copy full SHA for 89efc9f

File tree

Expand file treeCollapse file tree

2 files changed

+15
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-2
lines changed

‎.kokoro/trampoline_v2.sh

Copy file name to clipboardExpand all lines: .kokoro/trampoline_v2.sh
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff 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
306309
if [[ $# -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[@]}"
311316
else
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}"
318325
fi
319326

‎.trampolinerc

Copy file name to clipboardExpand all lines: .trampolinerc
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@ fi
6060
if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then
6161
TRAMPOLINE_IMAGE_UPLOAD="false"
6262
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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.