<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9756">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Jenkins2: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CI: Add optional uninstall step before installing asterisk<br><br>Change-Id: I7dedf1e925eafc3a0adf01dd9dfbe44eb642aab7<br>---<br>M tests/CI/gates.jenkinsfile<br>M tests/CI/installAsterisk.sh<br>M tests/CI/periodics-daily.jenkinsfile<br>M tests/CI/ref_debug.jenkinsfile<br>M tests/CI/unittests.jenkinsfile<br>5 files changed, 9 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile</span><br><span>index 78a9d24..ab0fd1c 100644</span><br><span>--- a/tests/CI/gates.jenkinsfile</span><br><span>+++ b/tests/CI/gates.jenkinsfile</span><br><span>@@ -153,7 +153,7 @@</span><br><span> img.inside("${dockerOptions} --name ${bt}-${groupName}") {</span><br><span> </span><br><span> lock("${JOB_NAME}.${NODE_NAME}.installer") {</span><br><span style="color: hsl(0, 100%, 40%);">- sh "sudo ./tests/CI/installAsterisk.sh --branch-name=${BRANCH_NAME} --user-group=jenkins:users"</span><br><span style="color: hsl(120, 100%, 40%);">+ sh "sudo ./tests/CI/installAsterisk.sh --uninstall-all --branch-name=${BRANCH_NAME} --user-group=jenkins:users"</span><br><span> }</span><br><span> </span><br><span> sh "sudo rm -rf ${groupDir} || : "</span><br><span>diff --git a/tests/CI/installAsterisk.sh b/tests/CI/installAsterisk.sh</span><br><span>index 74f5651..0806566 100755</span><br><span>--- a/tests/CI/installAsterisk.sh</span><br><span>+++ b/tests/CI/installAsterisk.sh</span><br><span>@@ -1,6 +1,8 @@</span><br><span> #!/usr/bin/env bash</span><br><span> </span><br><span> CIDIR=$(dirname $(readlink -fn $0))</span><br><span style="color: hsl(120, 100%, 40%);">+UNINSTALL=0</span><br><span style="color: hsl(120, 100%, 40%);">+UNINSTALL_ALL=0</span><br><span> source $CIDIR/ci.functions</span><br><span> </span><br><span> MAKE=`which make`</span><br><span>@@ -10,6 +12,9 @@</span><br><span> fi</span><br><span> destdir=${DESTDIR:+DESTDIR=$DESTDIR}</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+[ $UNINSTALL -gt 0 ] && ${MAKE} ${destdir} uninstall</span><br><span style="color: hsl(120, 100%, 40%);">+[ $UNINSTALL_ALL -gt 0 ] && ${MAKE} ${destdir} uninstall-all</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ${MAKE} ${destdir} install || ${MAKE} ${destdir} NOISY_BUILD=yes install || exit 1</span><br><span> ${MAKE} ${destdir} samples</span><br><span> if [ x"$DESTDIR" != x ] ; then</span><br><span>diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile</span><br><span>index 2d72766..8c97379 100644</span><br><span>--- a/tests/CI/periodics-daily.jenkinsfile</span><br><span>+++ b/tests/CI/periodics-daily.jenkinsfile</span><br><span>@@ -99,7 +99,7 @@</span><br><span> img.inside("${dockerOptions} --name ${bt}-${groupName}") {</span><br><span> </span><br><span> lock("${JOB_NAME}.${NODE_NAME}.installer") {</span><br><span style="color: hsl(0, 100%, 40%);">- sh 'sudo ./tests/CI/installAsterisk.sh --user-group=jenkins:users'</span><br><span style="color: hsl(120, 100%, 40%);">+ sh "sudo ./tests/CI/installAsterisk.sh --uninstall-all --branch-name=${BRANCH_NAME} --user-group=jenkins:users"</span><br><span> }</span><br><span> </span><br><span> sh "sudo rm -rf ${groupDir} || : "</span><br><span>diff --git a/tests/CI/ref_debug.jenkinsfile b/tests/CI/ref_debug.jenkinsfile</span><br><span>index d046a49..1fa8688 100644</span><br><span>--- a/tests/CI/ref_debug.jenkinsfile</span><br><span>+++ b/tests/CI/ref_debug.jenkinsfile</span><br><span>@@ -77,7 +77,7 @@</span><br><span> img.inside("${dockerOptions} --name ${bt}-${groupName}") {</span><br><span> </span><br><span> lock("${JOB_NAME}.${NODE_NAME}.installer") {</span><br><span style="color: hsl(0, 100%, 40%);">- sh "sudo ./tests/CI/installAsterisk.sh --branch-name=${BRANCH_NAME} --user-group=jenkins:users"</span><br><span style="color: hsl(120, 100%, 40%);">+ sh "sudo ./tests/CI/installAsterisk.sh --uninstall-all --branch-name=${BRANCH_NAME} --user-group=jenkins:users"</span><br><span> }</span><br><span> </span><br><span> sh "sudo rm -rf ${groupDir} || : "</span><br><span>diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile</span><br><span>index b019bee..82bafff 100644</span><br><span>--- a/tests/CI/unittests.jenkinsfile</span><br><span>+++ b/tests/CI/unittests.jenkinsfile</span><br><span>@@ -138,7 +138,7 @@</span><br><span> def outputfile = "${outputdir}/unittests-results.xml"</span><br><span> def testcmd = "test execute all"</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- sh "sudo ./tests/CI/installAsterisk.sh --branch-name=${BRANCH_NAME} --user-group=jenkins:users"</span><br><span style="color: hsl(120, 100%, 40%);">+ sh "sudo ./tests/CI/installAsterisk.sh --uninstall-all --branch-name=${BRANCH_NAME} --user-group=jenkins:users"</span><br><span> </span><br><span> sh "tests/CI/runUnittests.sh --user-group=jenkins:users --output-dir='${outputdir}' --output-xml='${outputfile}' --unittest-command='${testcmd}'"</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9756">change 9756</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9756"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I7dedf1e925eafc3a0adf01dd9dfbe44eb642aab7 </div>
<div style="display:none"> Gerrit-Change-Number: 9756 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>