Skip to content

Commit 1aa3313

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 6230ced commit 1aa3313

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
@@ -97,8 +97,8 @@ jobs:
9797
platform_rpc: nephos
9898

9999
buildSteps:
100-
- template: template-skipvstest.yml
101-
- template: template-daemon.yml
100+
- template: .azure-pipelines/template-skipvstest.yml@buildimage
101+
- template: .azure-pipelines/template-daemon.yml@buildimage
102102
- bash: |
103103
set -ex
104104
if [ $(GROUP_NAME) == vs ]; then
@@ -143,4 +143,4 @@ jobs:
143143
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
144144
fi
145145
displayName: "Build sonic image"
146-
- template: check-dirty-version.yml
146+
- 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
@@ -65,6 +65,6 @@ jobs:
6565
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
6666
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
6767
- ${{ parameters.postSteps }}
68-
- template: cleanup.yml
68+
- template: .azure-pipelines/cleanup.yml@buildimage
6969
jobGroups: ${{ parameters.jobGroups }}
7070
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)