-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Guohan Lu <lguohan@gmail.com>
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/* | ||
!target/*.bin | ||
!target/*.log | ||
!target/*.img.gz | ||
!target/docker-sonic-vs.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
|
||
trigger: | ||
- main | ||
|
||
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) | ||
|
||
resources: | ||
repositories: | ||
- repository: sonic-mgmt | ||
type: github | ||
name: Azure/sonic-mgmt | ||
endpoint: build | ||
|
||
stages: | ||
- stage: Build | ||
pool: sonicbld | ||
|
||
jobs: | ||
- job: | ||
displayName: "broadcom" | ||
timeoutInMinutes: 600 | ||
steps: | ||
- checkout: self | ||
submodules: recursive | ||
displayName: 'Checkout code' | ||
|
||
- script: | | ||
sudo modprobe overlay | ||
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/broadcom" | ||
make configure PLATFORM=broadcom | ||
trap "sudo rm -rf fsroot" EXIT | ||
make USERNAME=admin SONIC_BUILD_JOBS=$(nproc) $CACHE_OPTIONS target/sonic-broadcom.bin | ||
displayName: 'Build sonic image' | ||
- publish: $(System.DefaultWorkingDirectory)/ | ||
artifact: sonic-buildimage.broadcom.201811 | ||
displayName: "Archive sonic image" | ||
|
||
- job: | ||
displayName: "mellanox" | ||
timeoutInMinutes: 600 | ||
steps: | ||
- checkout: self | ||
submodules: recursive | ||
displayName: 'Checkout code' | ||
|
||
- script: | | ||
sudo modprobe overlay | ||
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.201811 | ||
displayName: "Archive sonic image" | ||
|
||
- job: | ||
displayName: "kvm" | ||
timeoutInMinutes: 600 | ||
steps: | ||
- checkout: self | ||
submodules: recursive | ||
displayName: 'Checkout code' | ||
|
||
- script: | | ||
echo $(Build.BuildNumber) | ||
sudo modprobe overlay | ||
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs" | ||
ENABLE_DOCKER_BASE_PULL=y 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.201811 | ||
displayName: "Archive sonic image" |