mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
CI: Initial commit for moving CI into source repo
Create tests/CI directory and add files used by Jenkins to build and test Asterisk. With this commit, Jenkins will run the Asterisk Unit Tests using the Jenkinsfile at tests/CI/unittests.jenkinsfile. Bash scripts to do the actual building and testing are also in the same directory. Output is placed in tests/CI/output so that directory has been added to .gitignore. Change-Id: I9448065465e6de2b878634510ace8fd1ef378608
This commit is contained in:
23
tests/CI/installAsterisk.sh
Executable file
23
tests/CI/installAsterisk.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
MAKE=`which make`
|
||||
if [ x"${@}" != x ] ; then
|
||||
mkdir -p "${@}"
|
||||
fi
|
||||
destdir=${@:+DESTDIR=${@}}
|
||||
|
||||
${MAKE} ${destdir} install || ${MAKE} ${destdir} NOISY_BUILD=yes install || exit 1
|
||||
${MAKE} ${destdir} samples
|
||||
if [ -n "${@}" ] ; then
|
||||
sed -i -r -e "s@\[directories\]\(!\)@[directories]@g" $@/etc/asterisk/asterisk.conf
|
||||
sed -i -r -e "s@ /(var|etc|usr)/@ ${@}/\1/@g" $@/etc/asterisk/asterisk.conf
|
||||
fi
|
||||
|
||||
set +e
|
||||
chown -R jenkins:users ${@}/var/lib/asterisk
|
||||
chown -R jenkins:users ${@}/var/spool/asterisk
|
||||
chown -R jenkins:users ${@}/var/log/asterisk
|
||||
chown -R jenkins:users ${@}/var/run/asterisk
|
||||
chown -R jenkins:users ${@}/etc/asterisk
|
||||
[ ! -d ${@}/tmp/asterisk-jenkins ] && mkdir ${@}/tmp/asterisk-jenkins
|
||||
chown -R jenkins:users ${@}/tmp/asterisk-jenkins
|
||||
ldconfig
|
Reference in New Issue
Block a user