xref: /openbmc/openbmc/meta-arm/ci/jobs-to-kas (revision 5082cc7f)
1#! /bin/bash
2
3# This script is expecting an input of machine name, optionally followed by a
4# colon and a list of one or more parameters separated by commas between
5# brackets.  For example, the following are acceptable:
6# corstone1000-mps3
7# fvp-base: [testimage]
8# qemuarm64-secureboot: [clang, glibc, testimage]
9#
10# Turn this list into a series of yml files separated by colons to pass to kas
11
12set -e -u
13
14FILES="ci/$(echo $1 | cut -d ':' -f 1).yml"
15
16for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
17	# Given that there are no yml files for gcc or glibc, as those are the
18	# defaults, we can simply ignore those parameters.  They are necessary
19	# to pass in so that matrix can correctly setup all of the permutations
20	# of each individual run.
21	if [[ $i == 'none' ]]; then
22		continue
23	fi
24	FILES+=":ci/$i.yml"
25done
26
27echo $FILES
28