X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fgather.sh;h=e3a6a9d1509744167e9da9fab77480a506790fb5;hp=b2c298b62f621c4dd6970bb82f799ee31111fbbd;hb=6da5a6920171682bd5bf6a77517bedfef91cbd0e;hpb=aa5f30a291cc6781cf7071118d1179d201df75b2 diff --git a/resources/libraries/bash/function/gather.sh b/resources/libraries/bash/function/gather.sh index b2c298b62f..e3a6a9d150 100644 --- a/resources/libraries/bash/function/gather.sh +++ b/resources/libraries/bash/function/gather.sh @@ -1,5 +1,5 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Copyright (c) 2019 PANTHEON.tech and/or its affiliates. +# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2021 PANTHEON.tech 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: @@ -124,7 +124,8 @@ function gather_vpp () { # - ${CSIT_DIR}/DPDK_STABLE_VER - DPDK version to use # by csit-vpp not-timed jobs. # - ${CSIT_DIR}/${VPP_VER_FILE} - Ubuntu VPP version to use. - # - ../*vpp*.deb|rpm - Relative to ${DOWNLOAD_DIR}, copied for vpp-csit jobs. + # - ../*vpp*.deb|rpm - Relative to ${DOWNLOAD_DIR}, + # copied for vpp-csit jobs. # Directories updated: # - ${DOWNLOAD_DIR}, vpp-*.deb files are copied here for vpp-csit jobs. # - ./ - Assumed ${DOWNLOAD_DIR}, *vpp*.deb|rpm files @@ -141,9 +142,10 @@ function gather_vpp () { "csit-"*) # Use downloaded packages with specific version. if [[ "${TEST_CODE}" == *"daily"* ]] || \ - ([[ "${TEST_CODE}" == *"weekly"* ]] && \ - [[ "${TEST_CODE}" != *"device"* ]]) || \ - [[ "${TEST_CODE}" == *"semiweekly"* ]]; + { [[ "${TEST_CODE}" == *"weekly"* ]] && \ + [[ "${TEST_CODE}" != *"device"* ]]; } || \ + [[ "${TEST_CODE}" == *"semiweekly"* ]] || \ + [[ "${TEST_CODE}" == *"hourly"* ]]; then warn "Downloading latest VPP packages from Packagecloud." else @@ -156,8 +158,10 @@ function gather_vpp () { download_artifacts || die ;; "vpp-csit-"*) + # Shorten line. + pgks="${PKG_SUFFIX}" # Use locally built packages. - mv "${DOWNLOAD_DIR}"/../*vpp*."${PKG_SUFFIX}" "${DOWNLOAD_DIR}"/ || { + mv "${DOWNLOAD_DIR}"/../*vpp*."${pkgs}" "${DOWNLOAD_DIR}"/ || { die "Move command failed." } ;;