-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path6.1xeno_staging.sh
More file actions
executable file
·78 lines (64 loc) · 2.4 KB
/
6.1xeno_staging.sh
File metadata and controls
executable file
·78 lines (64 loc) · 2.4 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash -ex
#this script is only for 6.1xenomai staing job
#generate datestring and STAGING_REV(actually, STAGING_REV is tag)
datestring=$(date +%y%m%d)T$(date +%H%M%S)Z
STAGING_REV=lts-${BASELINE}-xenomai-${datestring}
STAGING_REV_CVE=lts-${BASELINE}-xenomai-cve-${datestring}
echo "datestring=$datestring"
echo "STAGING_REV=$STAGING_REV"
echo "STAGING_REV_CVE=$STAGING_REV_CVE"
#get clean repos which used for build/compiling
rm -fr kernel-lts-staging
rm -fr kernel-lts-cve
git clone https://github.com/intel-innersource/os.linux.kernel.kernel-lts-staging kernel-lts-staging
git clone https://github.com/intel-innersource/os.linux.kernel.kernel-lts-cve kernel-lts-cve
tags=""
#switch to 6.1 branch in cve repo, which used for CVE-tag generation
if [[ "$CREATE_CVE_STAGING_BRANCH" == "true" ]];then
cd kernel-lts-cve
git checkout 6.1
#create tag for CVE content
echo "tag_name is $STAGING_REV_CVE"
git tag $STAGING_REV_CVE -m ""
# gittag register: skip this tag
git push origin $STAGING_REV_CVE
cd -
fi
#create tag and cve-tag for compiling/build
cd kernel-lts-staging
pwd
if [[ $ABB == none ]] || [[ $ABB == "" ]];then
echo "git checkout 6.1/dovetail-xenomai"
git checkout 6.1/dovetail-xenomai
else
echo "git checkout $ABB"
git checkout $ABB
fi
#create tag for compiling/build
echo "tag_name is $STAGING_REV"
git tag $STAGING_REV -m ""
git push origin $STAGING_REV
test $? -eq 0 && tags="${STAGING_REV}:1:1"
#create cve-tag for compiling/build
if [[ "$CREATE_CVE_STAGING_BRANCH" == "true" ]];then
git quiltimport --series=../kernel-lts-cve/xenomai/patches/series --patches=../kernel-lts-cve/xenomai/patches/
echo "cve tag_name is $STAGING_REV_CVE"
git tag $STAGING_REV_CVE -m ""
git push origin $STAGING_REV_CVE
test $? -eq 0 && tags="$tags ${STAGING_REV_CVE}:3:1"
fi
cd -
for tag in ${tags}; do
echo "EXTRA_DATA_TAG=$tag"
done
#generate prop file for downstream job, i.e., 6.1 xenomai build job and Banned words job
rm -f *.prop
echo "STAGING_REV=$STAGING_REV" > 6.1xeno.prop
echo "KERNEL=6.1lts" >> 6.1xeno.prop
echo "[Staging][${BASELINE}][XENOMAI]${datestring}" > subject.txt
echo "STAGING_REV=$STAGING_REV" > message.txt
if [[ "$CREATE_CVE_STAGING_BRANCH" == "true" ]];then
echo "STAGING_REV=$STAGING_REV_CVE" > 6.1xeno_cve.prop
echo "KERNEL=6.1lts" >> 6.1xeno_cve.prop
echo "STAGING_REV_CVE=$STAGING_REV_CVE" >> message.txt
fi