File tree 1 file changed +21
-3
lines changed
1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,25 @@ pool: sonicbld
18
18
19
19
stages :
20
20
- stage : Build
21
+ variables :
22
+ CACHE_MODE : none
23
+ VERSION_CONTROL_OPTIONS : ' SONIC_VERSION_CONTROL_COMPONENTS='
21
24
jobs :
22
25
- template : azure-pipelines-build.yml
23
26
parameters :
24
- buildSlave : y
27
+ buildOptions : ' ${{ variables.VERSION_CONTROL_OPTIONS }} SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y'
28
+ preSteps :
29
+ - script : |
30
+ containers=$(docker container ls | grep "sonic-slave" | awk '{ print $1 }')
31
+ if [ ! -z "$containers" ]; then
32
+ docker container kill $containers || true
33
+ sleep 5
34
+ fi
35
+ images=$(docker images 'sonic-slave-*' -a -q)
36
+ if [ ! -z "$images" ]; then
37
+ docker rmi -f $images
38
+ fi
39
+ displayName: 'Cleanup sonic slave'
25
40
- stage : UpgradeVersions
26
41
jobs :
27
42
- job : UpgradeVersions
@@ -48,11 +63,14 @@ stages:
48
63
cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/versions target/
49
64
make freeze FREEZE_VERSION_OPTIONS=-r
50
65
find files/build/versions
51
- for artifact in $artifacts
66
+ ordered_artifacts=$(echo "$artifacts" | grep -v -E "arm64|armhf" && echo "$artifacts" | grep -E "arm64|armhf")
67
+ for artifact in $ordered_artifacts
52
68
do
53
69
rm -rf target/versions
54
70
cp -r $artifact/versions target/
55
- make freeze FREEZE_VERSION_OPTIONS="-a -d"
71
+ OPTIONS="-a -d"
72
+ [[ "$artifact" == *arm64* || "$artifact" == *armhf* ]] && OPTIONS="-d"
73
+ make freeze FREEZE_VERSION_OPTIONS="$OPTIONS"
56
74
done
57
75
git diff files/build/versions
58
76
displayName: 'Freeze Versions'
You can’t perform that action at this time.
0 commit comments