refactor: move LAVA job definition templates into independent files

This change introduces a new script function to expand the variables in
a file. With this, we can move the LAVA YAML job template descriptions,
which are currently embedded inside individual HEREDOCs, into their own
files.

Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: I09805ab4b6894a371e63a944d113ca2f475a806b
diff --git a/script/lava-templates/juno-scp-tests-scmi.yaml b/script/lava-templates/juno-scp-tests-scmi.yaml
new file mode 100644
index 0000000..f625dd3
--- /dev/null
+++ b/script/lava-templates/juno-scp-tests-scmi.yaml
@@ -0,0 +1,52 @@
+device_type: juno
+job_name: scp-tests-scmi-juno
+
+$tags
+$juno_revision
+
+timeouts:
+  # Global timeout value for the whole job.
+  job:
+    minutes: 10
+  actions:
+    lava-test-monitor:
+      seconds: 180
+  connections:
+    lava-test-monitor:
+      seconds: 180
+
+priority: medium
+visibility: public
+
+actions:
+
+- deploy:
+    timeout:
+      minutes: 5
+    to: vemsd
+    recovery_image:
+      url: $recovery_img_url
+      compression: zip
+
+- boot:
+    method: minimal
+
+- test:
+    timeout:
+      minutes: 8
+
+    monitors:
+    #
+    # Monitor no.1
+    # Monitor the results from all the protocols
+    #
+    - name: SCP-SCMI-ALL-PROTOCOL
+      start: 'BL31: Baremetal test suite: scmi'
+      end: '\*\*\*\* SCMI tests complete \*\*\*\*'
+
+      pattern: '(?P<test_case_id>\d{3}):[\w ]+[\w\n\r[\] :<>&=]*?: (?P<result>CONFORMANT|NON CONFORMANT|SKIPPED)'
+
+      fixupdict:
+        "CONFORMANT": pass
+        "NON CONFORMANT": fail
+        "SKIPPED": skip