diff options
-rwxr-xr-x | jjb/scripts/vpp/arm-drivers.sh | 26 | ||||
-rw-r--r-- | jjb/vpp/vpp.yaml | 68 |
2 files changed, 88 insertions, 6 deletions
diff --git a/jjb/scripts/vpp/arm-drivers.sh b/jjb/scripts/vpp/arm-drivers.sh index cd0ff5cd1..2666bbe2b 100755 --- a/jjb/scripts/vpp/arm-drivers.sh +++ b/jjb/scripts/vpp/arm-drivers.sh @@ -18,6 +18,14 @@ echo "---> jjb/scripts/vpp/arm-drivers.sh" set -euxo pipefail line="*************************************************************************" +# Don't build anything if this is a merge job being run when +# the git HEAD id is not the same as the Gerrit New Revision id. +if [[ ${JOB_NAME} == *merge* ]] && [ -n "${GERRIT_NEWREV:-}" ] && + [ "$GERRIT_NEWREV" != "$GIT_COMMIT" ] ; then + echo -e "\n$line\nSkipping build. A newer patch has been merged.\n$line\n" + exit 0 +fi + 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) @@ -35,21 +43,27 @@ make_deps() { BUILD_ERROR="FAILED 'make install-ext-deps'" return fi + if [ -f extras/scripts/build_static_vppctl.sh ]; then + if ! extras/scripts/build_static_vppctl.sh ; then + BUILD_ERROR="FAILED 'extras/scripts/build_static_vppctl.sh'" + return + fi + fi } -make_build_release_arm_driver() { +make_pkg_verify_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'" + if ! make UNATTENDED=yes pkg-verify VPP_PLATFORM="$vpp_platform"; then + BUILD_ERROR="FAILED 'make pkg-verify 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 + make_pkg_verify_arm_driver cn913x + make_pkg_verify_arm_driver octeon9 + make_pkg_verify_arm_driver octeon10 fi if [ -n "$BUILD_ERROR" ] ; then BUILD_RESULT="$BUILD_ERROR" diff --git a/jjb/vpp/vpp.yaml b/jjb/vpp/vpp.yaml index 62d95e436..dfc26bf23 100644 --- a/jjb/vpp/vpp.yaml +++ b/jjb/vpp/vpp.yaml @@ -253,6 +253,7 @@ name: vpp-arm-drivers jobs: - 'vpp-verify-arm-drivers-{stream}-{os}-{executor-arch}' + - 'vpp-merge-arm-drivers-{stream}-{os}-{executor-arch}' project: 'vpp' os: - 'ubuntu2404' @@ -907,6 +908,73 @@ - fdio-infra-publish # [end] VPP-MERGE JOB TEMPLATE +# VPP-MERGE-ARM-DRIVERS JOB TEMPLATE +- job-template: + name: 'vpp-merge-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}' + - os-parameter: + os: '{os}' + - project-parameter: + project: '{project}' + - stream-parameter: + stream: '{stream}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'gerrit' + + wrappers: + - fdio-infra-wrappers: + build-timeout: 120 + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - config-file-provider: + files: + - file-id: '.packagecloud' + target: '/root/.packagecloud' + - config-file-provider: + files: + - file-id: 'packagecloud_api' + target: '/root/packagecloud_api' + - 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 + - shell: + !include-raw-escape: + - ../scripts/packagecloud_push.sh + + publishers: + - fdio-infra-publish +# [end] VPP-MERGE-ARM-DRIVERS JOB TEMPLATE + # VPP-GCC-VERIFY JOB TEMPLATE - job-template: name: 'vpp-gcc-verify-{stream}-{os}-{executor-arch}' |