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.
[jenkins]: Move script out of Jenkinsfile for re-use purpose (#38)
Signed-off-by: Shu0T1an ChenG <[email protected]>
- Loading branch information
Shuotian Cheng
authored
Jun 14, 2019
1 parent
d1be740
commit f3a13a4
Showing
4 changed files
with
92 additions
and
95 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
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,3 @@ | ||
#!/bin/bash -x | ||
|
||
docker run --rm=true --privileged -v $(pwd):/sonic -w /sonic -i sonic-slave-stretch-johnar ./scripts/vs/sonic-swss-build/build_in_docker.sh |
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,46 @@ | ||
#!/bin/bash -x | ||
|
||
# Install HIREDIS | ||
sudo dpkg -i buildimage/target/debs/stretch/libhiredis*.deb | ||
|
||
# Install libnl3 | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-3-200_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-3-dev_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-genl-3-200_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-genl-3-dev_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-route-3-200_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-route-3-dev_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-nf-3-200_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-nf-3-dev_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-cli-3-200_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libnl-cli-3-dev_*.deb | ||
|
||
# Install libteam | ||
sudo apt-get install -y libdbus-1-3 | ||
sudo dpkg -i buildimage/target/debs/stretch/libteam5_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libteamdctl0_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libteam-utils_*.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libteam-dev_*.deb | ||
|
||
# Install SAIVS | ||
sudo dpkg -i sairedis/libsaivs_*.deb | ||
sudo dpkg -i sairedis/libsaivs-dev_*.deb | ||
sudo dpkg -i sairedis/libsairedis_*.deb | ||
sudo dpkg -i sairedis/libsairedis-dev_*.deb | ||
sudo dpkg -i sairedis/libsaimetadata_*.deb | ||
sudo dpkg -i sairedis/libsaimetadata-dev_*.deb | ||
sudo dpkg -i sairedis/syncd-vs_*.deb | ||
|
||
# Install common library | ||
sudo dpkg -i common/libswsscommon_*.deb | ||
sudo dpkg -i common/libswsscommon-dev_*.deb | ||
|
||
pushd swss | ||
|
||
./autogen.sh | ||
fakeroot debian/rules binary | ||
|
||
popd | ||
|
||
mkdir target | ||
cp *.deb target/ |
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,30 @@ | ||
#!/bin/bash -x | ||
|
||
cp *.deb buildimage/target/debs/stretch/ | ||
cp sairedis/*.deb buildimage/target/debs/stretch/ | ||
cp common/*.deb buildimage/target/debs/stretch/ | ||
cp utilities/*.deb buildimage/target/debs/stretch/ | ||
|
||
pushd buildimage/platform/vs | ||
mkdir -p docker-sonic-vs/debs | ||
mkdir -p docker-sonic-vs/files | ||
mkdir -p docker-sonic-vs/python-debs | ||
mkdir -p docker-sonic-vs/python-wheels | ||
sudo mount --bind ../../target/debs/stretch docker-sonic-vs/debs | ||
sudo mount --bind ../../target/files/stretch docker-sonic-vs/files | ||
sudo mount --bind ../../target/python-debs docker-sonic-vs/python-debs | ||
sudo mount --bind ../../target/python-wheels docker-sonic-vs/python-wheels | ||
docker load < ../../target/docker-config-engine-stretch.gz | ||
docker build --squash --no-cache -t docker-sonic-vs docker-sonic-vs | ||
sudo umount docker-sonic-vs/debs | ||
sudo umount docker-sonic-vs/files | ||
sudo umount docker-sonic-vs/python-debs | ||
sudo umount docker-sonic-vs/python-wheels | ||
popd | ||
|
||
docker save docker-sonic-vs | gzip -c > buildimage/target/docker-sonic-vs.gz | ||
|
||
pushd swss/tests | ||
sudo py.test -v | ||
popd | ||
|