Update azp files with master branch

This commit is contained in:
shilongliu 2021-04-25 04:26:30 +00:00 committed by Shilong Liu
parent 0f27cdd388
commit cec269c582

View File

@ -4,7 +4,22 @@
# https://aka.ms/yaml # https://aka.ms/yaml
trigger: trigger:
- main branches:
include:
- master
- 202012
paths:
exclude:
- .github
pr:
branches:
include:
- master
- 202012
paths:
exclude:
- .github
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
@ -40,96 +55,74 @@ stages:
jobs: jobs:
- job: - job:
displayName: "broadcom" pool: sonictest
timeoutInMinutes: 600 displayName: "vstest"
timeoutInMinutes: 60
steps: steps:
- script: |
set -x
sudo rm -rf fsroot
username=$(id -un)
sudo chown -cR ${username}.${username} .
displayName: 'Cleanup'
- checkout: self - checkout: self
clean: true clean: true
submodules: recursive submodules: recursive
displayName: 'Checkout code' displayName: 'Checkout code'
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifacts: sonic-swss-common.amd64.ubuntu20_04
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
displayName: "Download sonic swss common deb packages"
- task: DownloadPipelineArtifact@2
inputs:
artifact: sonic-buildimage.vs
displayName: "Download sonic-buildimage.vs artifact"
- script: | - script: |
git submodule foreach --recursive git clean -xfdf set -x
git submodule foreach --recursive git reset --hard sudo dpkg -i --force-confask,confnew ../sonic-swss-common.amd64.ubuntu20_04/libswsscommon_1.0.0_amd64.deb
git submodule update --init --recursive sudo dpkg -i ../sonic-swss-common.amd64.ubuntu20_04/python3-swsscommon_1.0.0_amd64.deb
displayName: 'reset submodules' sudo docker load -i ../target/docker-sonic-vs.gz
- script: | docker tag docker-sonic-vs:latest docker-sonic-vs:$(Build.BuildNumber)
sudo modprobe overlay username=$(id -un)
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/broadcom"
make configure PLATFORM=broadcom trap "docker ps; docker images; ip netns list; \
trap "sudo rm -rf fsroot" EXIT docker rmi docker-sonic-vs:$(Build.BuildNumber); \
make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS target/sonic-broadcom.bin ip netns list | grep -E [-]srv[0-9]+ | awk '{print $1}' | xargs -I {} sudo ip netns delete {}; \
displayName: 'Build sonic image' sudo chown -R ${username}.${username} .; \
- publish: $(System.DefaultWorkingDirectory)/ sudo chown -R ${username}.${username} $(System.DefaultWorkingDirectory)" EXIT
artifact: sonic-buildimage.broadcom.201911 pushd platform/vs/tests
displayName: "Archive sonic image" sudo py.test -v --junitxml=tr.xml --imgname=docker-sonic-vs:$(Build.BuildNumber)
displayName: "Run vs tests"
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/tr.xml'
testRunTitle: vstest
- job: - job:
displayName: "mellanox" pool: sonictest
timeoutInMinutes: 600 displayName: "kvmtest-t0"
steps: timeoutInMinutes: 240
- script: |
set -x
sudo rm -rf fsroot
username=$(id -un)
sudo chown -cR ${username}.${username} .
displayName: 'Cleanup'
- checkout: self
clean: true
submodules: recursive
displayName: 'Checkout code'
- script: | steps:
git submodule foreach --recursive git clean -xfdf - template: .azure-pipelines/run-test-template.yml
git submodule foreach --recursive git reset --hard parameters:
git submodule update --init --recursive dut: vlab-01
displayName: 'reset submodules' tbname: vms-kvm-t0
- script: | ptf_name: ptf_vms6-1
sudo modprobe overlay tbtype: t0
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/mellanox"
make configure PLATFORM=mellanox
trap "sudo rm -rf fsroot" EXIT
make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS target/sonic-mellanox.bin
displayName: 'Build sonic image'
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-buildimage.mellanox.201911
displayName: "Archive sonic image"
- job: - job:
displayName: "kvm" pool: sonictest-t1-lag
timeoutInMinutes: 600 displayName: "kvmtest-t1-lag"
steps: timeoutInMinutes: 240
- script: |
set -x
sudo rm -rf fsroot
username=$(id -un)
sudo chown -cR ${username}.${username} .
displayName: 'Cleanup'
- checkout: self
clean: true
submodules: recursive
displayName: 'Checkout code'
- script: | steps:
git submodule foreach --recursive git clean -xfdf - template: .azure-pipelines/run-test-template.yml
git submodule foreach --recursive git reset --hard parameters:
git submodule update --init --recursive dut: vlab-03
displayName: 'reset submodules' tbname: vms-kvm-t1-lag
- script: | ptf_name: ptf_vms6-2
echo $(Build.BuildNumber) tbtype: t1-lag
sudo modprobe overlay
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs"
make configure PLATFORM=vs
trap "sudo rm -rf fsroot" EXIT
make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS \
target/docker-sonic-vs.gz target/sonic-vs.img.gz && \
sudo cp target/sonic-vs.img.gz /nfs/azpl/kvmimage/sonic-vs.$(Build.BuildNumber).img.gz
displayName: 'Build sonic image'
- publish: $(System.DefaultWorkingDirectory)/
artifact: sonic-buildimage.kvm.201911
displayName: "Archive sonic image"