tf-a-main: avoid fast-forward master if any of the sub-jobs failed

Avoided executing the fast-forward-master script if any of the
sub-jobs in tf-a-main failed.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I0327324ede0d32c9001ab9861bfee2672e78c159
diff --git a/tf-a-main.yaml b/tf-a-main.yaml
index 3779f55..9d2591a 100644
--- a/tf-a-main.yaml
+++ b/tf-a-main.yaml
@@ -299,4 +299,11 @@
         condition-best: SUCCESS
         condition-worst: SUCCESS
         steps:
-        - shell: bash "${WORKSPACE}/tf-a-ci-scripts/script/scratch_scripts/fast-forward-master.sh"
+        - shell: |-
+            #!/bin/bash
+            if [ $MULTIJOB_FAILED -eq 0 ]; then
+                echo "Proceed with integration->master fast-forward merge"
+                bash "${WORKSPACE}/tf-a-ci-scripts/script/scratch_scripts/fast-forward-master.sh"
+            else
+                echo "Do not proceed with integration->master merge as sub-jobs failed"
+            fi