From 9740fdcc2adaeeb92e02a99b53e120644f8ad4ae Mon Sep 17 00:00:00 2001 From: sonic-otn Date: Fri, 27 Oct 2023 15:31:18 +0800 Subject: [PATCH] add legacy otn vs image build flow, fix openssh version and compile error --- .../workflows/otn-legacy-vs-image-build.yml | 40 +++++++++++++++++++ .github/workflows/otn-vs-image-build.yml | 27 ------------- build_debian.sh | 6 +-- 3 files changed, 43 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/otn-legacy-vs-image-build.yml delete mode 100644 .github/workflows/otn-vs-image-build.yml diff --git a/.github/workflows/otn-legacy-vs-image-build.yml b/.github/workflows/otn-legacy-vs-image-build.yml new file mode 100644 index 000000000000..6b90b88011dc --- /dev/null +++ b/.github/workflows/otn-legacy-vs-image-build.yml @@ -0,0 +1,40 @@ +name: otn-legacy-vs-build + +on: + push: + branches: [ "otn_legacy" ] + pull_request: + branches: [ "otn_legacy" ] + workflow_dispatch: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: sonic-otn-server + + steps: + - uses: actions/checkout@v3 + with: + path: legacy_${{github.run_number}} + + - name: build + run: | + cd legacy_${{github.run_number}} + make init + make configure PLATFORM=vs + export USERNAME=root + export PASSWORD=root + export CLIUSER=admin + export CLIUSER_PASSWORD=admin + BUILD_MULTIASIC_KVM=y make target/sonic-vs.img.gz + + - name: 'Upload Artifact' + uses: actions/upload-artifact@v3 + with: + name: otn-legacy-artifact + path: | + legacy_${{github.run_number}}/sonic-installer.img + legacy_${{github.run_number}}/target/*.img.gz \ No newline at end of file diff --git a/.github/workflows/otn-vs-image-build.yml b/.github/workflows/otn-vs-image-build.yml deleted file mode 100644 index 887730a6b2bf..000000000000 --- a/.github/workflows/otn-vs-image-build.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: sonic-otn - -on: - workflow_dispatch: - push: - branches: [ "202012" ] - pull_request: - branches: [ "202012" ] - -jobs: - build: - - runs-on: sonic-otn - - steps: - - uses: actions/checkout@v3 - - - name: build - run: | - make init - make configure PLATFORM=vs - export USERNAME=root - export PASSWORD=root - export CLIUSER=admin - export CLIUSER_PASSWORD=admin - BUILD_MULTIASIC_KVM=y make target/sonic-vs.img.gz - diff --git a/build_debian.sh b/build_debian.sh index d07604054a1b..2beec5af67ac 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -326,7 +326,9 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in tcpdump \ dbus \ ntpstat \ - openssh-server \ + openssh-sftp-server=1:7.9p1-10+deb10u2 \ + openssh-client=1:7.9p1-10+deb10u2 \ + openssh-server=1:7.9p1-10+deb10u2 \ python \ python-apt \ traceroute \ @@ -488,8 +490,6 @@ done < files/image_config/sysctl/sysctl-net.conf sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT # Upgrade pip via PyPI and uninstall the Debian version -sudo chroot $FILESYSTEM_ROOT pip3 config set global.index-url http://mirrors.aliyun.com/pypi/simple -sudo chroot $FILESYSTEM_ROOT pip3 config set install.trusted-host mirrors.aliyun.com sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install --upgrade pip sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python-pip python3-pip