Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
diff --git a/ci/entrypoint.sh b/ci/entrypoint.sh
index 4cc27b3..794103c 100644
--- a/ci/entrypoint.sh
+++ b/ci/entrypoint.sh
@@ -1,92 +1,113 @@
#!/bin/bash
if [ ! -d "/srv/stick.git" ]; then
git clone https://git.kolab.org/diffusion/QA/stick.git /srv/stick.git
else
pushd /srv/stick.git
git remote set-url origin https://git.kolab.org/diffusion/QA/stick.git
git fetch origin
git reset --hard origin/master
git clean -d -f -x
popd
fi
# Create 3 as an alias for 1, so the _shell function
# can output data without the caller getting the input.
exec 3>&1
# If PS1 is set, we're interactive
if [ ! -z "${PS1}" ]; then
# Set a sensible prompt
PS1='[\u@${IMAGE} \W]\$ '
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="auto verbose"
if [ ! -f "/etc/bash_completion" ]; then
if [ -f "/etc/bash_completion.d/git" ]; then
. /etc/bash_completion.d/git
PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
fi
else
PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
fi
export PS1
PROMPT_COMMAND="echo -ne '\033]0;${IMAGE} (in ${HOSTNAME})\007'"
if [ -f "/usr/share/git-core/contrib/completion/git-prompt.sh" ]; then
source /usr/share/git-core/contrib/completion/git-prompt.sh
fi
fi
function _report {
+ echo $(printf '%0.1s' "="{1..72})
cat ${TMPDIR:-/tmp}/report.log
rm -rf ${TMPDIR:-/tmp}/report.log
+ echo $(printf '%0.1s' "="{1..72})
}
function _report_msg {
printf "%*s" $(( ${BASH_SUBSHELL} * 4 )) " " >> ${TMPDIR:-/tmp}/report.log
echo "$@" >> ${TMPDIR:-/tmp}/report.log
}
function _shell {
echo "Running $@ ..." >&3
$@ >&3 2>&3 ; retval=$?
if [ ${retval} -eq 0 ]; then
_report_msg "Running '$@' OK (at $(git rev-parse HEAD))"
echo "Running $@ OK (at $(git rev-parse HEAD))" >&3
else
_report_msg "Running '$@' FAILED (at $(git rev-parse HEAD))"
echo "Running $@ FAILED (at $(git rev-parse HEAD))" >&3
fi
echo ${retval}
}
if [ ! -d "/srv/${PACKAGE}.git" ]; then
git clone ${RO_URI} /srv/${PACKAGE}.git
else
pushd /srv/${PACKAGE}.git
git remote set-url origin ${RO_URI}
git fetch origin
git reset --hard origin/master
git clean -d -f -x
popd
fi
pushd /srv/${PACKAGE}.git
if [ ! -z "${COMMIT}" ]; then
git checkout ${COMMIT}
fi
retval=$(_shell yum-builddep -y ${PACKAGE})
+if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_build.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_build.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_unit.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_unit.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
popd
-echo $(printf '%0.1s' "="{1..72})
_report
-echo $(printf '%0.1s' "="{1..72})

File Metadata

Mime Type
text/x-diff
Expires
Fri, Apr 24, 1:07 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18896691
Default Alt Text
(3 KB)

Event Timeline