Skip to content

Commit 5a2a959

Browse files
[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 5e4826e commit 5a2a959

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
@@ -108,8 +108,8 @@ jobs:
108108
platform_rpc: nephos
109109

110110
buildSteps:
111-
- template: template-skipvstest.yml
112-
- template: template-daemon.yml
111+
- template: .azure-pipelines/template-skipvstest.yml@buildimage
112+
- template: .azure-pipelines/template-daemon.yml@buildimage
113113
- bash: |
114114
set -ex
115115
if [ $(GROUP_NAME) == vs ]; then
@@ -169,4 +169,4 @@ jobs:
169169
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
170170
fi
171171
displayName: "Build sonic image"
172-
- template: check-dirty-version.yml
172+
- 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
@@ -67,6 +67,6 @@ jobs:
6767
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
6868
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
6969
- ${{ parameters.postSteps }}
70-
- template: cleanup.yml
70+
- template: .azure-pipelines/cleanup.yml@buildimage
7171
jobGroups: ${{ parameters.jobGroups }}
7272
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)