Merge "Remove VPP master branch from ubuntu-18.04 executor."
[ci-management.git] / docker / scripts / lib_vpp.sh
index 5ed538a..12e5abd 100644 (file)
@@ -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"}
@@ -71,11 +80,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 +99,8 @@ 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["centos-8"]="stable/2106 stable/2110 master"
+VPP_BRANCHES["debian-10"]="stable/2106 stable/2110 master"
+VPP_BRANCHES["ubuntu-18.04"]="stable/2106 stable/2110"
+VPP_BRANCHES["ubuntu-20.04"]="stable/2106 stable/2110 master"
 export VPP_BRANCHES