[ci] Update common lib pipeline to build more distribute packages. (#10576)
This commit is contained in:
parent
dd243c1024
commit
0a99f87bec
@ -2,33 +2,39 @@ jobs:
|
|||||||
- job: Build
|
- job: Build
|
||||||
timeoutInMinutes: 120
|
timeoutInMinutes: 120
|
||||||
pool: sonicbld
|
pool: sonicbld
|
||||||
|
variables:
|
||||||
|
- template: template-variables.yml
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- script: |
|
- script: |
|
||||||
set -ex
|
set -ex
|
||||||
case $(Build.SourceBranchName) in
|
branch=$(Build.SourceBranchName)
|
||||||
202012 | 202106)
|
# DIST_MASTER is set in variable.
|
||||||
bldenv=buster
|
BRANCH=DIST_${branch^^}
|
||||||
;;
|
bldenvs=${!BRANCH}
|
||||||
*)
|
[ "$bldenvs" == "" ] && bldenvs="$(COMMON_LIB_BUILD_ENVS)"
|
||||||
bldenv=bullseye
|
for bldenv in $bldenvs
|
||||||
;;
|
do
|
||||||
esac
|
BLDENV=$bldenv make -f Makefile.work configure PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
|
||||||
BLDENV=$bldenv make -f Makefile.work configure PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
|
done
|
||||||
echo "##vso[task.setvariable variable=bldenv;]$bldenv"
|
set +x
|
||||||
|
echo "##vso[task.setvariable variable=bldenvs;]$bldenvs"
|
||||||
displayName: Make configure
|
displayName: Make configure
|
||||||
- script: |
|
- script: |
|
||||||
set -ex
|
set -ex
|
||||||
LIBNL3_VERSION_BASE=$(grep "LIBNL3_VERSION_BASE =" rules/libnl3.mk | awk '{print$3}')
|
for bldenv in $(bldenvs)
|
||||||
LIBNL3_VERSION=$(grep "LIBNL3_VERSION =" rules/libnl3.mk | awk '{print$3}' | sed -e "s/(//" -e "s/)//" -e "s/\\$//" -e "s/LIBNL3_VERSION_BASE/$LIBNL3_VERSION_BASE/")
|
do
|
||||||
BLDENV=$(bldenv) make -f Makefile.work target/debs/$(bldenv)/libnl-3-200_${LIBNL3_VERSION}_amd64.deb ENABLE_DOCKER_BASE_PULL=y
|
LIBNL3_VERSION_BASE=$(grep "LIBNL3_VERSION_BASE =" rules/libnl3.mk | awk '{print$3}')
|
||||||
|
LIBNL3_VERSION=$(grep "LIBNL3_VERSION =" rules/libnl3.mk | awk '{print$3}' | sed -e "s/(//" -e "s/)//" -e "s/\\$//" -e "s/LIBNL3_VERSION_BASE/$LIBNL3_VERSION_BASE/")
|
||||||
|
SONIC_BUILD_JOBS=$(nproc) BLDENV=$bldenv make -f Makefile.work target/debs/$bldenv/libnl-3-200_${LIBNL3_VERSION}_amd64.deb ENABLE_DOCKER_BASE_PULL=y
|
||||||
|
|
||||||
LIBYANG_VERSION_BASE=$(grep "LIBYANG_VERSION_BASE =" rules/libyang.mk | awk '{print$3}')
|
LIBYANG_VERSION_BASE=$(grep "LIBYANG_VERSION_BASE =" rules/libyang.mk | awk '{print$3}')
|
||||||
LIBYANG_VERSION=$(grep "LIBYANG_VERSION =" rules/libyang.mk | awk '{print$3}' | sed -e "s/\\$//" -e "s/(//" -e "s/)//" -e "s/LIBYANG_VERSION_BASE/$LIBYANG_VERSION_BASE/")
|
LIBYANG_VERSION=$(grep "LIBYANG_VERSION =" rules/libyang.mk | awk '{print$3}' | sed -e "s/\\$//" -e "s/(//" -e "s/)//" -e "s/LIBYANG_VERSION_BASE/$LIBYANG_VERSION_BASE/")
|
||||||
BLDENV=$(bldenv) make -f Makefile.work target/debs/$(bldenv)/libyang_${LIBYANG_VERSION}_amd64.deb
|
SONIC_BUILD_JOBS=$(nproc) BLDENV=$bldenv make -f Makefile.work target/debs/$bldenv/libyang_${LIBYANG_VERSION}_amd64.deb
|
||||||
find target -name *.deb | xargs -i cp {} $(Build.ArtifactStagingDirectory)
|
done
|
||||||
|
mv target $(Build.ArtifactStagingDirectory)
|
||||||
displayName: Make common lib packages
|
displayName: Make common lib packages
|
||||||
- publish: $(Build.ArtifactStagingDirectory)
|
- publish: $(Build.ArtifactStagingDirectory)
|
||||||
artifact: common-lib
|
artifact: common-lib
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
variables:
|
variables:
|
||||||
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
|
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
|
||||||
|
COMMON_LIB_BUILD_ENVS: 'bullseye'
|
||||||
|
Loading…
Reference in New Issue
Block a user