X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=docker%2Fscripts%2Flib_vpp.sh;h=60d4e4b6aab55d172157dd88beb6569150a2a0b4;hb=93580b1071398dbff9b64d73ba1554095335afcc;hp=5ed538a8820a39d0a91c7d51466d6a6a114325bf;hpb=7937f07593e81b8a42f787d06c0f3c0797642bc4;p=ci-management.git diff --git a/docker/scripts/lib_vpp.sh b/docker/scripts/lib_vpp.sh index 5ed538a88..60d4e4b6a 100644 --- a/docker/scripts/lib_vpp.sh +++ b/docker/scripts/lib_vpp.sh @@ -1,7 +1,7 @@ # lib_vpp.sh - Docker build script VPP library. # For import only. -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 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: @@ -23,6 +23,15 @@ alias lib_vpp_imported=true export CIMAN_DOCKER_SCRIPTS=${CIMAN_DOCKER_SCRIPTS:-"$(dirname $BASH_SOURCE)"} . $CIMAN_DOCKER_SCRIPTS/lib_common.sh + +VPP_SUPPORTED_EXECUTOR_CLASSES="builder" +vpp_supported_executor_class() { + if ! grep -q "${1:-}" <<< $VPP_SUPPORTED_EXECUTOR_CLASSES ; then + return 1 + fi + return 0 +} + make_vpp() { local target=$1 local branch=${2:-"master"} @@ -37,12 +46,9 @@ make_vpp() { return fi git clean -qfdx - description="'make UNATTENDED=y $target' in $(pwd) ($branch)" + description="'make UNATTENDED=yes $target' in $(pwd) ($branch)" echo_log -e " Starting $description..." - local force_opts="--allow-downgrades --allow-remove-essential" - force_opts="$force_opts --allow-change-held-packages" - make UNATTENDED=y CONFIRM="-y" FORCE="$force_opts" \ - $target 2>&1 | tee -a "$bld_log" + make UNATTENDED=yes $target 2>&1 | tee -a "$bld_log" git checkout -q -- . echo_log " Completed $description!" } @@ -71,11 +77,13 @@ make_vpp_test() { } docker_build_setup_vpp() { - if [ ! -d "$DOCKER_VPP_DIR" ] ; then - echo_log "Cloning VPP into $DOCKER_VPP_DIR..." - git clone -q https://gerrit.fd.io/r/vpp $DOCKER_VPP_DIR + if vpp_supported_executor_class "$EXECUTOR_CLASS" ; then + if [ ! -d "$DOCKER_VPP_DIR" ] ; then + echo_log "Cloning VPP into $DOCKER_VPP_DIR..." + git clone -q https://gerrit.fd.io/r/vpp $DOCKER_VPP_DIR + fi + clean_git_repo $DOCKER_VPP_DIR fi - clean_git_repo $DOCKER_VPP_DIR } # Branches must be listed in chronological order -- oldest stable branch @@ -88,10 +96,7 @@ docker_build_setup_vpp() { # to create an enumerated set of jobs jobs that match the # definitions here. declare -A VPP_BRANCHES -VPP_BRANCHES["centos-7"]="stable/2009" -VPP_BRANCHES["centos-8"]="stable/2009 stable/2101 master" -VPP_BRANCHES["debian-9"]="stable/2009" -VPP_BRANCHES["debian-10"]="stable/2009 stable/2101 master" -VPP_BRANCHES["ubuntu-18.04"]="stable/2009 stable/2101 master" -VPP_BRANCHES["ubuntu-20.04"]="stable/2009 stable/2101 master" +VPP_BRANCHES["debian-11"]="stable/2302 stable/2306 stable/2310 master" +VPP_BRANCHES["ubuntu-20.04"]="stable/2302 stable/2306 stable/2310 master" +VPP_BRANCHES["ubuntu-22.04"]="stable/2302 stable/2306 stable/2310 master" export VPP_BRANCHES