lava-templates: Allow to override job priority

The idea is to pass it as a param from a top-level job, e.g. make
tf-a-daily (background job) to use "low" priority, to give more
priority to "interactive" jobs, like patch testing.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I216d5f9693512945c95bb55c14090d575d82696c
(cherry picked from commit 163c210388bc17c6e5a891588eb916935e087342)
diff --git a/script/lava-templates/fvp-linux.yaml b/script/lava-templates/fvp-linux.yaml
index 6187e14..cf1b336 100644
--- a/script/lava-templates/fvp-linux.yaml
+++ b/script/lava-templates/fvp-linux.yaml
@@ -35,7 +35,7 @@
     fvp-deploy:
       minutes: 5
 
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 
 actions:
diff --git a/script/lava-templates/fvp-tftf.yaml b/script/lava-templates/fvp-tftf.yaml
index 0e49171..52cdc18 100644
--- a/script/lava-templates/fvp-tftf.yaml
+++ b/script/lava-templates/fvp-tftf.yaml
@@ -48,7 +48,7 @@
     bootloader-retry:
       seconds: 300
 
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 
 actions:
diff --git a/script/lava-templates/juno-linux-reboot.yaml b/script/lava-templates/juno-linux-reboot.yaml
index 0541ef5..de8b34b 100644
--- a/script/lava-templates/juno-linux-reboot.yaml
+++ b/script/lava-templates/juno-linux-reboot.yaml
@@ -16,7 +16,7 @@
   action:
     minutes: 10
 
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 
 actions:
diff --git a/script/lava-templates/juno-linux.yaml b/script/lava-templates/juno-linux.yaml
index 8b4e449..13a3038 100644
--- a/script/lava-templates/juno-linux.yaml
+++ b/script/lava-templates/juno-linux.yaml
@@ -16,7 +16,7 @@
   action:
     minutes: 10
 
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 
 actions:
diff --git a/script/lava-templates/juno-scp-tests-scmi.yaml b/script/lava-templates/juno-scp-tests-scmi.yaml
index f625dd3..6eac52b 100644
--- a/script/lava-templates/juno-scp-tests-scmi.yaml
+++ b/script/lava-templates/juno-scp-tests-scmi.yaml
@@ -15,7 +15,7 @@
     lava-test-monitor:
       seconds: 180
 
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 
 actions:
diff --git a/script/lava-templates/juno-tftf.yaml b/script/lava-templates/juno-tftf.yaml
index bb9f1eb..9eae847 100644
--- a/script/lava-templates/juno-tftf.yaml
+++ b/script/lava-templates/juno-tftf.yaml
@@ -15,7 +15,7 @@
     lava-test-monitor:
       seconds: 120
 
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 
 actions:
diff --git a/script/lava-templates/n1sdp-linux.yaml b/script/lava-templates/n1sdp-linux.yaml
index 0903064..dab89c5 100644
--- a/script/lava-templates/n1sdp-linux.yaml
+++ b/script/lava-templates/n1sdp-linux.yaml
@@ -4,7 +4,7 @@
   job:
     minutes: 30
 
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 context:
   extra_nfsroot_args: ',vers=3'
diff --git a/script/lava-templates/qemu-linux.yaml b/script/lava-templates/qemu-linux.yaml
index 814b20e..57b287b 100644
--- a/script/lava-templates/qemu-linux.yaml
+++ b/script/lava-templates/qemu-linux.yaml
@@ -1,6 +1,6 @@
 device_type: qemu
 job_name: qemu-linux-${test_config}
-priority: medium
+priority: ${LAVA_PRIORITY:-medium}
 visibility: public
 
 metadata: