Skip to content

Commit

Permalink
[ci] Fix docker hang issue and change template reference branch (#13894)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
liushilongbuaa authored and mssonicbld committed Feb 22, 2023
1 parent 9d20dda commit 041dc55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ jobs:
platform_rpc: nephos

buildSteps:
- template: template-skipvstest.yml
- template: template-daemon.yml
- template: .azure-pipelines/template-skipvstest.yml@buildimage
- template: .azure-pipelines/template-daemon.yml@buildimage
- bash: |
set -ex
if [ $(GROUP_NAME) == vs ]; then
Expand Down Expand Up @@ -134,4 +134,4 @@ jobs:
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
fi
displayName: "Build sonic image"
- template: check-dirty-version.yml
- template: .azure-pipelines/check-dirty-version.yml@buildimage
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
jobFilters: ${{ parameters.jobFilters }}
jobVariables: ${{ parameters.jobVariables }}
preSteps:
- template: cleanup.yml
- template: .azure-pipelines/cleanup.yml@buildimage
- ${{ parameters.preSteps }}
- script: |
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf)$"; then
Expand Down Expand Up @@ -64,6 +64,6 @@ jobs:
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
- ${{ parameters.postSteps }}
- template: cleanup.yml
- template: .azure-pipelines/cleanup.yml@buildimage
jobGroups: ${{ parameters.jobGroups }}
buildSteps: ${{ parameters.buildSteps }}
2 changes: 1 addition & 1 deletion .azure-pipelines/template-daemon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
do
sleep 120
now=$(date +%s)
pids=$(ps -C docker -o pid,etime,args | grep "docker build" | cut -d" " -f1)
pids=$(ps -C docker -o pid,etime,args | grep "docker build" | cut -d" " -f2)
for pid in $pids
do
start=$(date --date="$(ls -dl /proc/$pid --time-style full-iso | awk '{print$6,$7}')" +%s)
Expand Down

0 comments on commit 041dc55

Please sign in to comment.