From fbe5dfee30f419fece03fb4bf5c27bcfae7abd8c Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 15 Nov 2018 17:28:18 -0500 Subject: Apex: Refactor snapshot pipeline for other types This patch changes snapshot related scripts to allow for more than just the current snapshot type of "csit". This allows us to add other snapshot types, including the functest type. The same snapshot.properties file will be used to store information for all types of snapshots. The snap cache folder structure will remain the same, but hold different types of snapshots in the same folders. These changes include renaming the URLs for the snapshot artifacts to reflect the snapshot type, but remains backwards compatible until enough promotions have occurred and other apex snapshot deployment scripts have been migrated to the new format. Change-Id: If3e47e700b5ad9c95418179042b85814fe389233 Signed-off-by: Tim Rozet --- jjb/apex/apex-deploy.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'jjb/apex/apex-deploy.sh') diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 4876b8504..8f7af7ff9 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -6,6 +6,7 @@ set -o pipefail IPV6_FLAG=False ALLINONE_FLAG=False CSIT_ENV_FLAG=False +FUNCTEST_ENV_FLAG=False # log info to console echo "Starting the Apex deployment." @@ -119,6 +120,10 @@ if echo ${DEPLOY_SCENARIO} | grep csit; then CSIT_ENV_FLAG=True DEPLOY_SCENARIO=$(echo ${DEPLOY_SCENARIO} | sed 's/-csit//') echo "INFO: CSIT env requested in deploy scenario" +elif echo ${DEPLOY_SCENARIO} | grep functest; then + FUNCTEST_ENV_FLAG=True + DEPLOY_SCENARIO=$(echo ${DEPLOY_SCENARIO} | sed 's/-functest//') + echo "INFO: Functest env requested in deploy scenario" fi echo "Deploy Scenario set to ${DEPLOY_SCENARIO}" @@ -140,13 +145,18 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2" fi - if [[ "$PROMOTE" == "True" || "$CSIT_ENV_FLAG" == "True" ]]; then + if [[ "$FUNCTEST_ENV_FLAG" == "True" || "$CSIT_ENV_FLAG" == "True" ]]; then + if [[ "$CSIT_ENV_FLAG" == "True" ]]; then + ENV_TYPE="csit" + else + ENV_TYPE="functest" + fi if [[ "$OS_VERSION" != "master" ]]; then - CSIT_ENV="csit-${OS_VERSION}-environment.yaml" + SNAP_ENV="${ENV_TYPE}-${OS_VERSION}-environment.yaml" else - CSIT_ENV="csit-environment.yaml" + SNAP_ENV="${ENV_TYPE}-environment.yaml" fi - DEPLOY_CMD="${DEPLOY_CMD} -e ${CSIT_ENV}" + DEPLOY_CMD="${DEPLOY_CMD} -e ${SNAP_ENV}" fi else # settings for bare metal deployment @@ -163,7 +173,8 @@ fi if [ "$IPV6_FLAG" == "True" ]; then NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml" -elif [[ "$PROMOTE" == "True" ]]; then +elif [[ "$CSIT_ENV_FLAG" == "True" || "$FUNCTEST_ENV_FLAG" == "True" ]]; then + # We use csit network settings which is single network for snapshots NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_csit.yaml" else NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml" -- cgit 1.2.3-korg