Skip to content

Commit d391f38

Browse files
committed
Log Docker commands
1 parent 35cd01d commit d391f38

1 file changed

Lines changed: 26 additions & 20 deletions

File tree

‎ci/build-in-docker.sh‎

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,15 @@ if [[ "${CACHE_FROM:-}" != "" ]]; then
7171
docker pull "$image_tag"
7272
fi
7373

74-
docker build \
75-
--build-arg ARCH="$ARCH" \
76-
--build-arg docker_arch="$docker_arch" \
77-
"${build_args[@]}" \
78-
-t "$image_tag" \
79-
"$this_dir"/docker
74+
(
75+
set -x
76+
docker build \
77+
--build-arg ARCH="$ARCH" \
78+
--build-arg docker_arch="$docker_arch" \
79+
"${build_args[@]}" \
80+
-t "$image_tag" \
81+
"$this_dir"/docker
82+
)
8083

8184
# by default, we are not logged into the registry and therefore must not attempt to push the image
8285
if [[ "${PUSH_IMAGE:-}" ]]; then
@@ -125,17 +128,20 @@ fi
125128
# b) allow the build scripts to "mv" the binaries into the /out directory
126129
uid="${UID:-"$(id -u)"}"
127130
info "Running build with uid $uid"
128-
docker run \
129-
--rm \
130-
-i \
131-
-e GITHUB_RUN_NUMBER \
132-
-e ARCH \
133-
-e BUILD_TYPE \
134-
-e USE_STATIC_RUNTIME \
135-
-e CI \
136-
--user "$uid" \
137-
"${docker_args[@]}" \
138-
-v "$(readlink -f "$this_dir"/..):/ws" \
139-
-w /ws \
140-
"$image_tag" \
141-
bash -xc "$build_script"
131+
(
132+
set -x
133+
docker run \
134+
--rm \
135+
-i \
136+
-e GITHUB_RUN_NUMBER \
137+
-e ARCH \
138+
-e BUILD_TYPE \
139+
-e USE_STATIC_RUNTIME \
140+
-e CI \
141+
--user "$uid" \
142+
"${docker_args[@]}" \
143+
-v "$(readlink -f "$this_dir"/..):/ws" \
144+
-w /ws \
145+
"$image_tag" \
146+
bash -xc "$build_script"
147+
)

0 commit comments

Comments
 (0)