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.
[sonic-utilities] Support PR check builds for 201911 branch (sonic-ne…
…t#188) If the target branch is "201911", we will copy artifacts from the latest buildimage-vs-201911 build, then build the sonic-utilities Python 2 Debian package. We will not run SwSS tests against the 201911 branch PR, only against the master branch.
- Loading branch information
Showing
3 changed files
with
63 additions
and
7 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
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,44 @@ | ||
#!/bin/bash -xe | ||
|
||
echo ${JOB_NAME##*/}.${BUILD_NUMBER} | ||
|
||
cat <<EOF > build_sonic_utilities.sh | ||
#!/bin/bash -xe | ||
ls -lrt | ||
sudo apt-get install python-m2crypto | ||
sudo apt-get -y purge python-click | ||
sudo pip install "click>=7.0" | ||
sudo pip install click-default-group==1.2 | ||
sudo pip install tabulate | ||
sudo pip install natsort | ||
sudo pip install buildimage/target/python-wheels/swsssdk-2.0.1-py2-none-any.whl | ||
sudo pip install buildimage/target/python-wheels/sonic_py_common-1.0-py2-none-any.whl | ||
sudo pip install buildimage/target/python-wheels/sonic_config_engine-1.0-py2-none-any.whl | ||
sudo pip install buildimage/target/python-wheels/sonic_yang_mgmt-1.0-py2-none-any.whl | ||
sudo pip install mockredispy==2.9.3 | ||
sudo pip install netifaces==0.10.9 | ||
sudo pip install --upgrade setuptools | ||
sudo pip install pytest-runner==4.4 | ||
sudo pip install xmltodict==0.12.0 | ||
sudo pip install jsondiff==1.2.0 | ||
sudo dpkg -i buildimage/target/debs/stretch/libyang_1.0.73_amd64.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/libyang-cpp_1.0.73_amd64.deb | ||
sudo dpkg -i buildimage/target/debs/stretch/python2-yang_1.0.73_amd64.deb | ||
cd sonic-utilities | ||
# Test building the Debian package | ||
sudo python setup.py --command-packages=stdeb.command bdist_deb | ||
EOF | ||
|
||
chmod 755 build_sonic_utilities.sh | ||
|
||
# Build sonic-utilities and copy resulting Debian package | ||
docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWD sonicdev-microsoft.azurecr.io:443 | ||
docker pull sonicdev-microsoft.azurecr.io:443/sonic-slave-stretch-johnar:latest | ||
docker run --rm=true --privileged -v $(pwd):/sonic -w /sonic -i sonicdev-microsoft.azurecr.io:443/sonic-slave-stretch-johnar ./build_sonic_utilities.sh | ||
|
||
cp sonic-utilities/deb_dist/python-sonic-utilities_*.deb buildimage/target/python-debs/ |