feat(vpp): add vpp verify job for arm drivers 48/42148/5
authorDave Wallace <[email protected]>
Wed, 15 Jan 2025 04:34:27 +0000 (23:34 -0500)
committerDave Wallace <[email protected]>
Wed, 15 Jan 2025 20:20:21 +0000 (15:20 -0500)
Change-Id: Iabe0e7f16e93b85e2b9a53744a6b743b30e1ea87
Signed-off-by: Dave Wallace <[email protected]>
jjb/scripts/vpp/arm-drivers.sh [new file with mode: 0755]
jjb/vpp/vpp.yaml

diff --git a/jjb/scripts/vpp/arm-drivers.sh b/jjb/scripts/vpp/arm-drivers.sh
new file mode 100755 (executable)
index 0000000..cd0ff5c
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Copyright (c) 2025 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+echo "---> jjb/scripts/vpp/arm-drivers.sh"
+
+set -euxo pipefail
+
+line="*************************************************************************"
+OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+OS_ARCH=$(uname -m)
+DRYRUN="${DRYRUN:-}"
+BUILD_RESULT="SUCCESSFULLY COMPLETED"
+BUILD_ERROR=""
+RETVAL="0"
+
+make_deps() {
+    if ! make UNATTENDED=yes install-dep ; then
+        BUILD_ERROR="FAILED 'make install-dep'"
+        return
+    fi
+    if ! make UNATTENDED=yes install-ext-deps ; then
+        BUILD_ERROR="FAILED 'make install-ext-deps'"
+        return
+    fi
+}
+make_build_release_arm_driver() {
+    vpp_platform="$1"
+    git clean -fdx || true
+    if ! make UNATTENDED=yes build-release VPP_PLATFORM="$vpp_platform"; then
+        BUILD_ERROR="FAILED 'make build-release VPP_PLATFORM=$vpp_platform'"
+        return
+    fi
+}
+
+if [ "${DRYRUN,,}" != "true" ] ; then
+    make_deps
+    make_build_release_arm_driver cn913x
+    make_build_release_arm_driver octeon9
+    make_build_release_arm_driver octeon10
+fi
+if [ -n "$BUILD_ERROR" ] ; then
+    BUILD_RESULT="$BUILD_ERROR"
+    RETVAL="1"
+fi
+echo -e "\n$line\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^} ARM DRIVERS BUILD $BUILD_RESULT\n$line\n"
+exit $RETVAL
index 2cf84db..9bd5182 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2024 Cisco and/or its affiliates.
+# Copyright (c) 2025 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
 #       in .../ci-management/docker/scripts/lib_vpp.sh
 #       The job configuration must be derived from that list, thus
 #       modifications to both should be made at the same time.
-#       The AARCH64 architecture is in the process of catching up
-#       with X86_64 in terms of OS coverage.  Thus the jobs are
-#       a subset of those defined in the docker image build script.
 - project:
     name: vpp-aarch64
     jobs:
           os: 'ubuntu2404'
 # [end] VPP-AARCH64 PROJECT
 
+# VPP-ARM-DRIVERS-AARCH64 PROJECT
+- project:
+    name: vpp-arm-drivers
+    jobs:
+      - 'vpp-verify-arm-drivers-{stream}-{os}-{executor-arch}'
+    project: 'vpp'
+    os:
+      - 'ubuntu2404'
+    make-parallel-jobs: '4'
+    stream:
+      - 'master':
+          branch: 'master'
+          branch-refspec: ''
+    executor-arch: 'aarch64'
+# [end] VPP-ARM-DRIVERS-AARCH64 PROJECT
+
 # VPP-CSIT-VERIFY-PERF PROJECT
 - project:
     name: vpp-csit-verify-perf
 
 # [end] VPP-CHECKSTYLE-VERIFY JOB TEMPLATE
 
+# VPP-VERIFY-ARM-DRIVERS JOB TEMPLATE
+- job-template:
+    name: 'vpp-verify-arm-drivers-{stream}-{os}-{executor-arch}'
+
+    project-type: freestyle
+    node: 'builder-{os}-prod-{executor-arch}'
+    concurrent: true
+
+    properties:
+      - lf-infra-properties:
+          build-days-to-keep: "{build-days-to-keep}"
+
+    # Please keep parameters in alphabetical order
+    parameters:
+      - gerrit-parameter:
+          branch: '{branch}'
+      - gerrit-refspec-parameter:
+          refspec: '{branch-refspec}'
+      - os-parameter:
+          os: '{os}'
+      - project-parameter:
+          project: '{project}'
+      - stream-parameter:
+          stream: '{stream}'
+
+    scm:
+      - gerrit-trigger-scm:
+          credentials-id: 'jenkins-gerrit-credentials'
+          refspec: '$GERRIT_REFSPEC'
+          choosing-strategy: 'gerrit'
+
+    wrappers:
+      - fdio-infra-wrappers:
+          build-timeout: 120
+
+    triggers:
+      - gerrit-trigger-checkstyle:
+          name: '{project}'
+          branch: '{branch}'
+
+    builders:
+      - shell:
+          !include-raw-escape:
+          - ../scripts/setup_executor_env.sh
+      - shell:
+          !include-raw-escape:
+          - ../scripts/setup_vpp_ubuntu_docker_test.sh
+      - shell:
+          !include-raw-escape:
+          - ../scripts/setup_vpp_ext_deps.sh
+      - shell:
+          !include-raw-escape:
+          - ../scripts/vpp/arm-drivers.sh
+
+    publishers:
+      - fdio-infra-publish
+# [end] VPP-VERIFY-ARM-DRIVERS JOB TEMPLATE
+
 # VPP-VERIFY-HST JOB TEMPLATE
 - job-template:
     name: 'vpp-verify-hst-{stream}-{os}-{executor-arch}'