Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .azure-pipelines/docker-ptf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ stages:
BUILD_OPTIONS="SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y MIRROR_SNAPSHOT=$MIRROR_SNAPSHOT
SONIC_BUILD_RETRY_COUNT=3 SONIC_BUILD_RETRY_INTERVAL=600 DOCKER_BUILDKIT=0 SONIC_VERSION_CONTROL_COMPONENTS="

make NOBUSTER=1 NOBULLSEYE=1 $BUILD_OPTIONS configure PLATFORM=vs NOTRIXIE=1 # docker-ptf is built for bookworm, disable trixie currently to save build time. will enable it after migrating to trixie.
make -f Makefile.work BLDENV=bookworm $BUILD_OPTIONS target/docker-ptf.gz
make NOBUSTER=1 NOBULLSEYE=1 NOBOOKWORM=1 $BUILD_OPTIONS configure PLATFORM=vs
make -f Makefile.work BLDENV=trixie $BUILD_OPTIONS target/docker-ptf.gz
cp -r target $(Build.ArtifactStagingDirectory)/target
displayName: Build docker-ptf.gz

Expand Down Expand Up @@ -149,7 +149,7 @@ stages:
PTF_MODIFIED: 'True'
INCLUDE_JOBS: "t0_job,t1_job,t2_job,t0_2vlans_job,t0_sonic_job,dpu_job,t1_multi_asic_job"
OVERRIDE_PARAMS:
REPO_NAME: "sonic-mgmt"
REPO_NAME: "sonic-buildimage"

- stage: Publish
dependsOn: Test
Expand Down
4 changes: 1 addition & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ stages:
- name: testbed_file
value: vtestbed.csv
- name: PTF_MODIFIED
# $[ coalesce(stageDependencies.BuildVS.vs.outputs['PublishAndSetPtfTag.PTF_MODIFIED'], stageDependencies.BuildVS.vs.outputs['script.PTF_MODIFIED'], stageDependencies.BuildVS.vs.outputs['script1.PTF_MODIFIED'], 'False') ]
# Disable in-PR testing of docker-ptf image; To be re-enabled after image can be uploaded to approved ACR
value: 'False'
value: $[ coalesce(stageDependencies.BuildVS.vs.outputs['PublishAndSetPtfTag.PTF_MODIFIED'], stageDependencies.BuildVS.vs.outputs['script.PTF_MODIFIED'], stageDependencies.BuildVS.vs.outputs['script1.PTF_MODIFIED'], 'False') ]

# For every test job:
# continueOnError: false means it's a required test job and will block merge if it fails
Expand Down
19 changes: 10 additions & 9 deletions dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM {{ prefix }}multiarch/debian-debootstrap:arm64-stretch
{% elif PTF_ENV_PY_VER == "mixed" %}
FROM {{ prefix}}debian:buster
{% else %}
FROM {{ prefix }}debian:bookworm
FROM {{ prefix }}debian:trixie
{% endif %}

{% from "dockers/dockerfile-macros.j2" import install_python_wheels, copy_files, install_offending_packages %}
Expand Down Expand Up @@ -52,7 +52,7 @@ RUN apt-get update \
{% if PTF_ENV_PY_VER == "mixed" %}
libboost-atomic1.71.0 \
{% else %}
libboost-atomic1.81.0 \
libboost-atomic1.83.0 \
flex \
bison \
tcpd \
Expand Down Expand Up @@ -86,9 +86,9 @@ RUN apt-get update \
tacacs+ \
{% endif %}
rsyslog \
ntp \
ntpsec \
ntpstat \
ntpdate \
ntpsec-ntpdate \
arping \
bridge-utils \
libteam-utils \
Expand Down Expand Up @@ -367,7 +367,7 @@ RUN set -e; \
RUN pip3 install "setuptools>=70.0.0" "lxml>=5.3.2"

## Adjust sshd settings
RUN mkdir /var/run/sshd \
RUN mkdir -p /var/run/sshd \
&& echo 'root:root' | chpasswd \
&& sed -ri '/^#?PermitRootLogin/c\PermitRootLogin yes' /etc/ssh/sshd_config \
&& sed -ri '/^#?UsePAM/c\UsePAM no' /etc/ssh/sshd_config \
Expand Down Expand Up @@ -434,7 +434,7 @@ ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

{% if PTF_ENV_PY_VER == "py3" %}
# Install the python-saithrift into the virtual environment
RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.11.egg" >> /root/env-python3/lib/python3.11/site-packages/easy-install.pth
RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.13.egg" >> /root/env-python3/lib/python3.13/site-packages/easy-install.pth
{% endif %}
Comment on lines 435 to 438
Comment on lines 435 to 438

# {% if PTF_ENV_PY_VER == "py3" %}
Expand Down Expand Up @@ -464,10 +464,11 @@ RUN set -eux; \
ln -sf "$f" "/usr/local/bin/$base"; \
done

RUN echo "/root/env-python3/lib/python3.11/site-packages" > /usr/lib/python3/dist-packages/virtualenv.pth; \
echo "/root/env-python3/lib/python3.11/site-packages" > /usr/lib/python3.11/dist-packages/virtualenv.pth
RUN mkdir -p /usr/lib/python3.13/dist-packages; \
echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3/dist-packages/virtualenv.pth; \
echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3.13/dist-packages/virtualenv.pth

RUN echo "PYTHONPATH=/root/env-python3/lib/python3.11/site-packages" >> /etc/environment
RUN echo "PYTHONPATH=/root/env-python3/lib/python3.13/site-packages" >> /etc/environment
Comment on lines +467 to +471
Comment on lines +467 to +471
Comment on lines +467 to +471

# Final system-level security upgrade: ensure every Debian package is at its
# latest patched version. This must run AFTER all apt-get install / dpkg -i
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-ptf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ else
$(DOCKER_PTF)_DEPENDS += $(PYTHON_SAITHRIFT) $(P4LANG_PI) $(P4LANG_BMV2) $(P4LANG_P4C)
endif
SONIC_DOCKER_IMAGES += $(DOCKER_PTF)
SONIC_BOOKWORM_DOCKERS += $(DOCKER_PTF)
SONIC_TRIXIE_DOCKERS += $(DOCKER_PTF)
Comment on lines 12 to +13
endif
Loading