Khasim Syed Mohammed | 430d594 | 2021-08-09 21:26:15 +0530 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2021 Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | # Generate a YAML file in order to dispatch N1SDP runs on LAVA. Note that this |
| 9 | # script would produce a meaningful output when run via. Jenkins |
| 10 | # |
| 11 | # $bin_mode must be set. This script outputs to STDOUT |
| 12 | |
| 13 | ci_root="$(readlink -f "$(dirname "$0")/..")" |
| 14 | source "$ci_root/utils.sh" |
| 15 | source "$ci_root/n1sdp_utils.sh" |
| 16 | |
| 17 | get_recovery_image_url() { |
| 18 | local build_job="tf-build" |
| 19 | local bin_mode="${bin_mode:?}" |
| 20 | |
| 21 | if upon "$jenkins_run"; then |
| 22 | echo "$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode/n1sdp-board-firmware_primary.zip" |
| 23 | else |
| 24 | echo "file://$workspace/artefacts/$bin_mode/n1sdp-board-firmware_primary.zip" |
| 25 | fi |
| 26 | } |
| 27 | |
| 28 | recovery_img_url="${recovery_img_url:-$(get_recovery_image_url)}" |
| 29 | |
Chris Kay | 3d80788 | 2022-08-31 16:00:02 +0100 | [diff] [blame] | 30 | expand_template "$(dirname "$0")/lava-templates/n1sdp-linux.yaml" |