blob: 24ac0a23b8d2c167321f114f55a404f29e313755 [file] [log] [blame]
Leonardo Sandoval9dfdd1b2020-08-06 17:08:11 -05001#!/usr/bin/env bash
Fathi Boudra422bf772019-12-02 11:10:16 +02002#
Leonardo Sandoval579c7372020-10-23 15:23:32 -05003# Copyright (c) 2019-2020 Arm Limited. All rights reserved.
Fathi Boudra422bf772019-12-02 11:10:16 +02004#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8# Generate a YAML file in order to dispatch Juno TFTF runs on LAVA. Note that
9# this script would produce a meaningful output when run via. Jenkins.
10#
11# $bin_mode must be set. This script outputs to STDOUT
12
13ci_root="$(readlink -f "$(dirname "$0")/..")"
14source "$ci_root/utils.sh"
15
16get_recovery_image_url() {
17 local build_job="tf-build"
18 local bin_mode="${bin_mode:?}"
19
20 if upon "$jenkins_run"; then
21 echo "$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode/juno_recovery.zip"
22 else
23 echo "file://$workspace/artefacts/$bin_mode/juno_recovery.zip"
24 fi
25}
26
Fathi Boudra422bf772019-12-02 11:10:16 +020027recovery_img_url="${recovery_img_url:-$(get_recovery_image_url)}"
28
Manish Pandey7719a382020-09-07 12:30:18 +010029# Allow running juno tests on specific revision(r0/r1/r2).
30juno_revision="${juno_revision:-}"
31if [ ! -z "$juno_revision" ]; then
32 tags="tags:"
33 juno_revision="- ${juno_revision}"
34else
35 tags=""
36fi
37
Chris Kay3d807882022-08-31 16:00:02 +010038expand_template "$(dirname "$0")/lava-templates/juno-tftf.yaml"