[ci] Remove dulplicated code, which is to avoid docker hanging. (#14064)
Why I did it remove duplicated code for docker hanging issue. These codes are included in daemon step. How I did it remove these codes.
This commit is contained in:
parent
37b31c5916
commit
1ccad8f0b3
@ -103,25 +103,6 @@ jobs:
|
||||
- template: .azure-pipelines/template-skipvstest.yml@buildimage
|
||||
- template: .azure-pipelines/template-daemon.yml@buildimage
|
||||
- bash: |
|
||||
(
|
||||
while true
|
||||
do
|
||||
sleep 120
|
||||
now=$(date +%s)
|
||||
pids=$(ps aux | grep -v grep | grep -E "^.{,100}docker build" | awk '{print$2}')
|
||||
for pid in $pids
|
||||
do
|
||||
start=$(date --date="$(ls -dl /proc/$pid --time-style full-iso | awk '{print$6,$7}')" +%s)
|
||||
time_s=$(($now-$start))
|
||||
if [[ $time_s -gt $(DOCKER_BUILD_TIMEOUT) ]]; then
|
||||
echo =========== $(date +%F%T) $time_s &>> target/daemon.log
|
||||
ps $pid &>> target/daemon.log
|
||||
sudo kill $pid
|
||||
fi
|
||||
done
|
||||
done
|
||||
) &
|
||||
daemon_pid=$!
|
||||
set -ex
|
||||
if [ $(GROUP_NAME) == vs ]; then
|
||||
if [ $(dbg_image) == yes ]; then
|
||||
@ -169,6 +150,5 @@ jobs:
|
||||
fi
|
||||
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
|
||||
fi
|
||||
sudo kill $daemon_pid
|
||||
displayName: "Build sonic image"
|
||||
- template: .azure-pipelines/check-dirty-version.yml@buildimage
|
||||
|
Reference in New Issue
Block a user