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/gen_juno_linux_yaml.sh b/script/gen_juno_linux_yaml.sh
index 8a7df56..fa0130a 100755
--- a/script/gen_juno_linux_yaml.sh
+++ b/script/gen_juno_linux_yaml.sh
@@ -39,58 +39,4 @@
tags=""
fi
-cat <<EOF
-device_type: juno
-job_name: tf-juno
-
-context:
- bootloader_prompt: $bootloader_prompt
-
-$tags
-$juno_revision
-
-timeouts:
- # Global timeout value for the whole job.
- job:
- minutes: 30
- # Unless explicitly overwritten, no single action should take more than
- # 10 minutes to complete.
- action:
- minutes: 10
-
-priority: medium
-visibility: public
-
-actions:
-
-- deploy:
- namespace: recovery
- to: vemsd
- recovery_image:
- url: $recovery_img_url
- compression: zip
-
-- deploy:
- namespace: target
- to: nfs
- os: debian
- nfsrootfs:
- url: $nfs_rootfs
- compression: gz
-
-- boot:
- # Drastically increase the timeout for the boot action because of the udev
- # issues when using TF build config "juno-all-cpu-reset-ops".
- # TODO: Should increase the timeout only for this TF build config, not all!
- timeout:
- minutes: 15
- namespace: target
- connection-namespace: recovery
- method: u-boot
- commands: norflash
- auto-login:
- login_prompt: 'login:'
- username: root
- prompts:
- - $linux_prompt
-EOF
+expand_template "$(dirname "$0")/lava-templates/juno-linux.yaml"