diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8fd6af7ef68f..31533d216861 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,66 +34,19 @@ stages: pool: sonicbld jobs: - - job: - displayName: "broadcom" - timeoutInMinutes: 600 - steps: - - script: | - sudo rm -rf fsroot - username=$(id -un) - sudo chown -R ${username}.${username} . - displayName: 'Cleanup' - - checkout: self - clean: true - submodules: recursive - displayName: 'Checkout code' - - script: | - git submodule foreach --recursive git clean -xfdf - git submodule foreach --recursive git reset --hard - git submodule update --init --recursive - displayName: 'reset submodules' - - script: | - sudo modprobe overlay - CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/broadcom" - ENABLE_DOCKER_BASE_PULL=y make configure PLATFORM=broadcom - trap "sudo rm -rf fsroot" EXIT - make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS target/sonic-broadcom.bin && \ - ENABLE_SYNCD_RPC=y make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS target/docker-syncd-brcm-rpc.gz - displayName: 'Build sonic image' - - publish: $(System.DefaultWorkingDirectory)/ - artifact: sonic-buildimage.broadcom - displayName: "Archive sonic image" - - - job: - displayName: "mellanox" - timeoutInMinutes: 600 - steps: - - script: | - sudo rm -rf fsroot - username=$(id -un) - sudo chown -R ${username}.${username} . - displayName: 'Cleanup' - - checkout: self - clean: true - submodules: recursive - displayName: 'Checkout code' - - - script: | - git submodule foreach --recursive git clean -xfdf - git submodule foreach --recursive git reset --hard - git submodule update --init --recursive - displayName: 'reset submodules' - - script: | - sudo modprobe overlay - CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/mellanox" - ENABLE_DOCKER_BASE_PULL=y make configure PLATFORM=mellanox - trap "sudo rm -rf fsroot" EXIT - make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS target/sonic-mellanox.bin && \ - ENABLE_SYNCD_RPC=y make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS target/docker-syncd-mlnx-rpc.gz - displayName: 'Build sonic image' - - publish: $(System.DefaultWorkingDirectory)/ - artifact: sonic-buildimage.mellanox - displayName: "Archive sonic image" + - template: .azure-pipelines/build-template.yml + parameters: + platform: broadcom + platform_short: brcm + cache_mode: rcache + sync_rpc_image: true + + - template: .azure-pipelines/build-template.yml + parameters: + platform: mellanox + platform_short: mlnx + cache_mode: rcache + sync_rpc_image: true - job: displayName: "kvm"