engine: Set deploy scenario and create k8s 1.16 jobs
[infra/cicd.git] / jjb / cloud-infra / determine-scenario.sh
index 2779d63e88840356ec5ed5775e5056a72f9ea3ec..14833b3e4c2d43e8145887d2b904fb78ae4b860c 100644 (file)
@@ -47,7 +47,9 @@ function override_installer_scenario() {
     export PROVISIONER_TYPE=$(echo "$COMMIT_MESSAGE" | grep '^provisioner-type:' | cut -d":" -f2 | sed 's/\s*//g')
   else
     # default is almost always bifrost
-    export PROVISIONER_TYPE=bifrost
+    if [[ "$PROVISIONER_TYPE" == "" ]]; then
+      export PROVISIONER_TYPE=bifrost
+    fi
   fi
 
   if [[ "$COMMIT_MESSAGE" =~ "deploy-scenario:" && "$COMMIT_MESSAGE" =~ "installer-type:" ]]; then
@@ -69,13 +71,17 @@ function determine_scenario() {
   echo "Info: Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
   if [[ "$GERRIT_PROJECT" == "infra/engine" ]]; then
     echo "Info: Setting INSTALLER_TYPE and DEPLOY_SCENARIO to defaults for project $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
-    export PROVISIONER_TYPE=bifrost
+    export PROVISIONER_TYPE=$PROVISIONER_TYPE
     export INSTALLER_TYPE=kubespray
     export DEPLOY_SCENARIO=k8-calico-nofeature
     write_change_metadata
   else
     cd $WORKSPACE
     COMMIT_MESSAGE=$(git show -s --format=%B)
+    export PROVISIONER_TYPE=none
+    export INSTALLER_TYPE=none
+    export DEPLOY_SCENARIO=none
+    write_change_metadata
     echo "Info: Not implemented!"
     exit 0
   fi