mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-01-27 10:19:35 +00:00
local-up-cluster: store logs in artifacts directory
Store logs in a temporary subdirectory under the artifacts directory when running in CI. This ensures logs are available in the prow web UI for easier access and debugging.
This commit is contained in:
@@ -1359,6 +1359,13 @@ if [[ "${KUBETEST_IN_DOCKER:-}" == "true" ]]; then
|
||||
export PATH="${KUBE_ROOT}/third_party/etcd:${PATH}"
|
||||
KUBE_FASTBUILD=true make ginkgo cross
|
||||
|
||||
log_dir="${LOG_DIR}"
|
||||
if [[ -n "${ARTIFACTS}" ]]; then
|
||||
# Store logs in the artifacts directory so that they are
|
||||
# available in the prow web UI.
|
||||
log_dir="${ARTIFACTS}"
|
||||
fi
|
||||
|
||||
echo "install additional packages"
|
||||
apt-get update
|
||||
apt-get install -y conntrack dnsutils nftables ripgrep sudo tree vim
|
||||
@@ -1385,7 +1392,7 @@ if [[ "${KUBETEST_IN_DOCKER:-}" == "true" ]]; then
|
||||
echo "DOCKER_OPTS=\"\${DOCKER_OPTS} --debug\"" >> /etc/default/docker
|
||||
|
||||
# let's log it where we can grab it later
|
||||
echo "DOCKER_LOGFILE=${LOG_DIR}/docker.log" >> /etc/default/docker
|
||||
echo "DOCKER_LOGFILE=${log_dir}/docker.log" >> /etc/default/docker
|
||||
|
||||
echo "stopping docker"
|
||||
service docker stop
|
||||
@@ -1404,7 +1411,7 @@ if [[ "${KUBETEST_IN_DOCKER:-}" == "true" ]]; then
|
||||
|
||||
echo "starting containerd"
|
||||
containerd_endpoint="${CONTAINER_RUNTIME_ENDPOINT#unix://}"
|
||||
start-stop-daemon --start --background --pidfile /var/run/containerd.pid --output ${LOG_DIR}/containerd.log \
|
||||
start-stop-daemon --start --background --pidfile /var/run/containerd.pid --output "${log_dir}/containerd.log" \
|
||||
--exec /usr/bin/containerd -- --address "${containerd_endpoint}"
|
||||
kube::util::wait_for_success 60 2 "ctr --address ${containerd_endpoint} images list"
|
||||
if [ $? == "1" ]; then
|
||||
|
||||
Reference in New Issue
Block a user