Add protobuf and dashapi to sonic-mgmt (#15743)
#### Why I did it The testcases in sonic-mgmt need the packages of protobuf and dashapi ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it Because the docker of sonic-mgmt is based on ubuntu20.04, it cannot directly install the packages compiled by slave due to dependency issues. Download related packaged directly from Azp. #### How to verify it Check azp stats.
This commit is contained in:
parent
2602ad25ba
commit
a24845997d
@ -210,6 +210,27 @@ RUN dpkg -i \
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
|
||||
# Install protobuf 3.21.12
|
||||
RUN mkdir -p /tmp/protobuf \
|
||||
cd /tmp/protobuf \
|
||||
&& wget https://sonicstorage.blob.core.windows.net/public/ubuntu/20.04/libprotobuf-dev_3.21.12-3_amd64.deb \
|
||||
&& wget https://sonicstorage.blob.core.windows.net/public/ubuntu/20.04/libprotobuf-lite32_3.21.12-3_amd64.deb \
|
||||
&& wget https://sonicstorage.blob.core.windows.net/public/ubuntu/20.04/libprotobuf32_3.21.12-3_amd64.deb \
|
||||
&& wget https://sonicstorage.blob.core.windows.net/public/ubuntu/20.04/libprotoc-dev_3.21.12-3_amd64.deb \
|
||||
&& wget https://sonicstorage.blob.core.windows.net/public/ubuntu/20.04/libprotoc32_3.21.12-3_amd64.deb \
|
||||
&& wget https://sonicstorage.blob.core.windows.net/public/ubuntu/20.04/protobuf-compiler_3.21.12-3_amd64.deb \
|
||||
&& wget https://sonicstorage.blob.core.windows.net/public/ubuntu/20.04/python3-protobuf_3.21.12-3_amd64.deb \
|
||||
&& dpkg -i *.deb \
|
||||
&& rm -rf /tmp/protobuf
|
||||
|
||||
# Install dash-api
|
||||
RUN cd /tmp \
|
||||
&& mkdir -p /usr/lib/python3/dist-packages/dash_api \
|
||||
&& wget https://raw.githubusercontent.com/sonic-net/sonic-buildimage/master/src/sonic-dash-api/pypkg/__init__.py -O /usr/lib/python3/dist-packages/dash_api/__init__.py \
|
||||
&& git clone https://github.com/sonic-net/sonic-dash-api.git \
|
||||
&& protoc -I=sonic-dash-api/proto --python_out=/usr/lib/python3/dist-packages/dash_api sonic-dash-api/proto/*.proto \
|
||||
&& rm -rf /tmp/sonic-dash-api
|
||||
|
||||
RUN mkdir /var/run/sshd
|
||||
EXPOSE 22
|
||||
|
||||
|
@ -6,7 +6,7 @@ LIB_SONIC_DASH_API = libdashapi_$(LIB_SONIC_DASH_API_VERSION)_$(CONFIGURED_ARCH)
|
||||
$(LIB_SONIC_DASH_API)_SRC_PATH = $(SRC_PATH)/sonic-dash-api
|
||||
|
||||
$(LIB_SONIC_DASH_API)_DEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PROTOBUF_DEV) $(PROTOBUF_COMPILER)
|
||||
$(LIB_SONIC_DASH_API)_RDEPENDS += $(LIBSWSSCOMMON) $(LIBNL3) $(LIBNL_GENL3) $(LIBNL_ROUTE3) $(PROTOBUF) $(PROTOBUF_LITE)
|
||||
$(LIB_SONIC_DASH_API)_RDEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PYTHON3_PROTOBUF)
|
||||
|
||||
SONIC_DPKG_DEBS += $(LIB_SONIC_DASH_API)
|
||||
|
||||
|
2
slave.mk
2
slave.mk
@ -1560,4 +1560,4 @@ jessie : $$(addprefix $(TARGET_PATH)/,$$(JESSIE_DOCKER_IMAGES)) \
|
||||
|
||||
## To build some commonly used libs. Some submodules depend on these libs.
|
||||
## It is used in component pipelines. For example: swss needs libnl, libyang
|
||||
lib-packages: $(addprefix $(DEBS_PATH)/,$(LIBNL3) $(LIBYANG))
|
||||
lib-packages: $(addprefix $(DEBS_PATH)/,$(LIBNL3) $(LIBYANG) $(PROTOBUF) $(LIB_SONIC_DASH_API))
|
||||
|
Loading…
Reference in New Issue
Block a user