Skip to content

Commit 911e796

Browse files
liushilongbuaamssonicbld
authored andcommitted
[ci] Fix docker hang issue and change template reference branch (sonic-net#13894)
Why I did it Azure pipeline change. Use common template to make it easy to change common steps. Fix docker hang issue. How I did it
1 parent 9d20dda commit 911e796

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.azure-pipelines/azure-pipelines-build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ jobs:
9898
platform_rpc: nephos
9999

100100
buildSteps:
101-
- template: template-skipvstest.yml
102-
- template: template-daemon.yml
101+
- template: .azure-pipelines/template-skipvstest.yml@buildimage
102+
- template: .azure-pipelines/template-daemon.yml@buildimage
103103
- bash: |
104104
set -ex
105105
if [ $(GROUP_NAME) == vs ]; then
@@ -134,4 +134,4 @@ jobs:
134134
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
135135
fi
136136
displayName: "Build sonic image"
137-
- template: check-dirty-version.yml
137+
- template: .azure-pipelines/check-dirty-version.yml@buildimage

.azure-pipelines/azure-pipelines-image-template.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
jobFilters: ${{ parameters.jobFilters }}
2626
jobVariables: ${{ parameters.jobVariables }}
2727
preSteps:
28-
- template: cleanup.yml
28+
- template: .azure-pipelines/cleanup.yml@buildimage
2929
- ${{ parameters.preSteps }}
3030
- script: |
3131
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf)$"; then
@@ -64,6 +64,6 @@ jobs:
6464
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
6565
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
6666
- ${{ parameters.postSteps }}
67-
- template: cleanup.yml
67+
- template: .azure-pipelines/cleanup.yml@buildimage
6868
jobGroups: ${{ parameters.jobGroups }}
6969
buildSteps: ${{ parameters.buildSteps }}

.azure-pipelines/template-daemon.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steps:
55
do
66
sleep 120
77
now=$(date +%s)
8-
pids=$(ps -C docker -o pid,etime,args | grep "docker build" | cut -d" " -f1)
8+
pids=$(ps -C docker -o pid,etime,args | grep "docker build" | cut -d" " -f2)
99
for pid in $pids
1010
do
1111
start=$(date --date="$(ls -dl /proc/$pid --time-style full-iso | awk '{print$6,$7}')" +%s)

0 commit comments

Comments
 (0)