forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add azure pipeline CI/CD (sonic-net#754)
* CI: add azure pipeline CI/CD Signed-off-by: Guohan Lu <lguohan@gmail.com>
- Loading branch information
Showing
2 changed files
with
75 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,2 @@ | ||
**/* | ||
!*.deb |
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,73 @@ | ||
# 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: | ||
branches: | ||
include: | ||
- "*" | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
container: | ||
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest | ||
|
||
steps: | ||
- script: | | ||
sudo apt-get install -qq -y \ | ||
qtbase5-dev \ | ||
libdbus-glib-1-2 \ | ||
libdbus-glib-1-dev \ | ||
libpcsclite-dev \ | ||
docbook-to-man \ | ||
docbook-utils \ | ||
aspell-en \ | ||
libhiredis0.14 \ | ||
libhiredis-dev \ | ||
libnl-3-dev \ | ||
libnl-genl-3-dev \ | ||
libnl-route-3-dev \ | ||
libnl-nf-3-dev \ | ||
libnl-cli-3-dev \ | ||
swig3.0 \ | ||
libpython2.7-dev \ | ||
libzmq5 libzmq3-dev \ | ||
libboost-all-dev | ||
sudo apt-get install -y redis-server | ||
sudo sed -ri 's/^# unixsocket/unixsocket/' /etc/redis/redis.conf | ||
sudo sed -ri 's/^unixsocketperm .../unixsocketperm 777/' /etc/redis/redis.conf | ||
sudo sed -ri 's/redis-server.sock/redis.sock/' /etc/redis/redis.conf | ||
sudo service redis-server start | ||
sudo apt-get install -y rsyslog | ||
sudo service rsyslog start | ||
displayName: "Install dependencies" | ||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
source: specific | ||
project: build | ||
pipeline: 9 | ||
artifacts: sonic-swss-common | ||
displayName: "Download sonic swss common deb packages" | ||
- script: | | ||
sudo dpkg -i sonic-swss-common/libswsscommon_1.0.0_amd64.deb | ||
sudo dpkg -i sonic-swss-common/libswsscommon-dev_1.0.0_amd64.deb | ||
workingDirectory: $(Pipeline.Workspace) | ||
displayName: "Install sonic swss Common" | ||
- checkout: self | ||
submodules: true | ||
- script: | | ||
./autogen.sh | ||
fakeroot dpkg-buildpackage -b -us -uc -Tbinary-syncd-vs | ||
cp ../*.deb . | ||
displayName: "Compile sonic sairedis" | ||
- script: | | ||
make check | ||
displayName: "Run sonic sairedis unit tests" | ||
- publish: $(System.DefaultWorkingDirectory)/ | ||
artifact: sonic-sairedis | ||
displayName: "Archive sonic sairedis debian packages" |