diff --git a/azure-pipelines.yml b/azure-pipelines.yml index af214110..faa5ca32 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ stages: vmImage: ubuntu-20.04 container: - image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:$(BUILD_BRANCH) + image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bookworm:$(BUILD_BRANCH) steps: - checkout: self @@ -58,7 +58,7 @@ stages: sudo dpkg -i libyang_1.0.73_*.deb sudo dpkg -i libswsscommon_1.0.0_amd64.deb sudo dpkg -i python3-swsscommon_1.0.0_amd64.deb - workingDirectory: $(Pipeline.Workspace)/target/debs/bullseye/ + workingDirectory: $(Pipeline.Workspace)/target/debs/bookworm/ displayName: 'Install Debian dependencies' - script: | @@ -71,20 +71,22 @@ stages: sudo pip3 install sonic_config_engine-1.0-py3-none-any.whl sudo pip3 install sonic_platform_common-1.0-py3-none-any.whl sudo pip3 install sonic_utilities-1.2-py3-none-any.whl - workingDirectory: $(Pipeline.Workspace)/target/python-wheels/bullseye/ + workingDirectory: $(Pipeline.Workspace)/target/python-wheels/bookworm/ displayName: 'Install Python dependencies' - script: | set -ex # Install .NET CORE curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - - sudo apt-add-repository https://packages.microsoft.com/debian/11/prod + sudo apt-add-repository https://packages.microsoft.com/debian/12/prod sudo apt-get update - sudo apt-get install -y dotnet-sdk-5.0 + sudo apt-get install -y dotnet-sdk-8.0 displayName: "Install .NET CORE" - script: | - python3 setup.py test + pip3 install ".[testing]" + pip3 uninstall --yes sonic-host-services + pytest displayName: 'Test Python 3' - task: PublishTestResults@2 @@ -103,8 +105,7 @@ stages: displayName: 'Publish Python 3 test coverage' - script: | - set -e - python3 setup.py bdist_wheel + python3 -m build -n displayName: 'Build Python 3 wheel' - publish: '$(System.DefaultWorkingDirectory)/dist/'