diff --git a/.azure-pipelines/docker-ptf.yml b/.azure-pipelines/docker-ptf.yml index 3f9273a1e8a..d1904f8e7db 100644 --- a/.azure-pipelines/docker-ptf.yml +++ b/.azure-pipelines/docker-ptf.yml @@ -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 @@ -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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 21d68808a1f..37d9383cf8f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index ce0dfbcd543..773fe3c3c97 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -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 %} @@ -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 \ @@ -86,9 +86,9 @@ RUN apt-get update \ tacacs+ \ {% endif %} rsyslog \ - ntp \ + ntpsec \ ntpstat \ - ntpdate \ + ntpsec-ntpdate \ arping \ bridge-utils \ libteam-utils \ @@ -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 \ @@ -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 %} # {% if PTF_ENV_PY_VER == "py3" %} @@ -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 # 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 diff --git a/platform/vs/docker-ptf.mk b/platform/vs/docker-ptf.mk index b91e8878b67..0ede0001cca 100644 --- a/platform/vs/docker-ptf.mk +++ b/platform/vs/docker-ptf.mk @@ -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) endif