xci: Skip jobs if the scenario is not supported on a distro 77/50977/2
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 23 Jan 2018 09:10:52 +0000 (10:10 +0100)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 23 Jan 2018 09:27:06 +0000 (10:27 +0100)
Change-Id: I22d2327558ee1d19d04775da6abf1b3eed5b357a
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
jjb/xci/xci-promote.sh
jjb/xci/xci-run-functest.sh
jjb/xci/xci-start-deployment.sh
jjb/xci/xci-start-new-vm.sh

index b164089..98ad7ff 100755 (executable)
@@ -20,4 +20,11 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     exit 0
 fi
 
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
 echo "Hello World!"
index 169d86f..4fbc6c4 100755 (executable)
@@ -20,4 +20,11 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     exit 0
 fi
 
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
 echo "Hello World!"
index 75de7ec..e86f5b3 100755 (executable)
@@ -20,4 +20,11 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     exit 0
 fi
 
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
 ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
index dc6139b..b72c339 100755 (executable)
@@ -20,6 +20,13 @@ if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
     exit 0
 fi
 
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
 cd $WORKSPACE
 
 # The start-new-vm.sh script will copy the entire releng-xci directory