-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate
executable file
·44 lines (31 loc) · 1.12 KB
/
create
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
STORAGE=http://storage.kernelci.org/
API=https://api.kernelci.org/
. create.conf
GIT_DESCRIBE=v5.0.9
BRANCH="master"
BRANCH=linux-5.0.y
ARCH=arm64
TREE=mainline
TREE=stable
LAB=lab-baylibre
PABCK=$(pwd)
ARCH=$1
DEVTYPE=$2
wget https://storage.kernelci.org/stable/linux-5.0.y -O laststable || exit $?
GIT_DESCRIBE=v$(grep -o '5\.0\.[0-9]*' laststable | sort -V | uniq | tail -n1)
cd ~/kernelci-core/
python2.7 ./lava-v2-jobs-from-api.py --api ${API} --storage ${STORAGE} --describe ${GIT_DESCRIBE} --tree ${TREE} --branch ${BRANCH} --arch ${ARCH} --plans boot --token ${API_TOKEN} --defconfigs 1 --lab $LAB
HC=$(find ~/kernelci-core/$LAB/ |grep $DEVTYPE | head -n1)
if [ ! -e "$HC" ];then
echo "ERROR: $HC does not exists, cannot found a job with $DEVTYPE"
exit 1
fi
echo "DEBUG: copy $HC"
cd $PABCK || exit 1
echo "DEBUG: copy"
cp $HC health-checks/${DEVTYPE}.yaml || exit 1
sed -i "s,job_name.*,job_name: Health Check for $DEVTYPE with $GIT_DESCRIBE," health-checks/${DEVTYPE}.yaml || exit 1
#sed -i 's,defconfig,defconfig/gcc-7,' health-checks/${DEVTYPE}.yaml || exit 1
./convert health-checks/${DEVTYPE}.yaml
exit 0