-
Notifications
You must be signed in to change notification settings - Fork 11
/
ci-build-src
executable file
·76 lines (72 loc) · 2.1 KB
/
ci-build-src
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/sh
set -e
. $CITHOME/ci-rpm-common
case "${project}" in
dlm)
export PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
;;
esac
case $build in
coverity)
case "${project}" in
pcs)
echo "cov-build --dir=./cov --no-command --fs-capture-search pcs --fs-capture-search pcs_test $MAKECOVOPTS"
cov-build --dir=./cov --no-command --fs-capture-search pcs --fs-capture-search pcs_test $MAKECOVOPTS
;;
fence-agents)
echo "cov-build --dir=./cov $MAKE $MAKECOVOPTS"
cov-build --dir=./cov $MAKE $MAKECOVOPTS
echo "cov-build --dir=./cov --no-command --fs-capture-search agents $MAKECOVOPTS"
cov-build --dir=./cov --no-command --fs-capture-search agents $MAKECOVOPTS
;;
*)
echo "cov-build --dir=./cov $MAKE $PARALLELMAKE $MAKECOVOPTS"
cov-build --dir=./cov $MAKE $PARALLELMAKE $MAKECOVOPTS
;;
esac
echo "cov-analyze --dir=./cov --wait-for-license $covoptions"
cov-analyze --dir=./cov --wait-for-license $covoptions
echo "cov-format-errors --dir=./cov --json-output-v7 cov.json"
cov-format-errors --dir=./cov --json-output-v7 cov.json
echo "cov-format-errors --dir=./cov --emacs-style > cov.txt"
cov-format-errors --dir=./cov --emacs-style > cov.txt
echo "cov-format-errors --dir=./cov --html-output cov.html"
cov-format-errors --dir=./cov --html-output cov.html
for i in cov.json cov.txt; do
sed -i -e 's#'${WORKSPACE}'##g' $i
done
find cov.html -type f -exec sed -i -e 's#'${WORKSPACE}'##g' {} \;
;;
rpm)
case "${project}" in
pacemaker)
# make sure CI version is alway higher than any distro
export SPECVERSION=$BUILD_NUMBER
;;
esac
if [ -n "$RPMDEPS" ]; then
echo "$MAKE $MAKERPMOPTS rpm"
$MAKE $MAKERPMOPTS rpm || removerpmdeps 1
removerpmdeps 0
else
echo "$MAKE $MAKERPMOPTS rpm"
$MAKE $MAKERPMOPTS rpm
fi
;;
*)
case "${project}" in
pcs)
if [ -f .venv/bin/activate ]; then
. .venv/bin/activate
export PATH="$(pwd)/.venv"/bin/:$PATH
fi
echo "$MAKE $PARALLELMAKE $MAKEOPTS"
$MAKE $PARALLELMAKE $MAKEOPTS
;;
*)
echo "$MAKE $PARALLELMAKE $MAKEOPTS"
$MAKE $PARALLELMAKE $MAKEOPTS
;;
esac
;;
esac