<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9439">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CI: Make build tag an acceptable docker name<br><br>Change-Id: I3a4b8a4a9c488ddabf9daf651dc1334222056f38<br>---<br>M tests/CI/gateTestGroups.json<br>M tests/CI/gates.jenkinsfile<br>M tests/CI/periodic-dailyTestGroups.json<br>M tests/CI/periodics-daily.jenkinsfile<br>M tests/CI/unittests.jenkinsfile<br>5 files changed, 23 insertions(+), 22 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/CI/gateTestGroups.json b/tests/CI/gateTestGroups.json</span><br><span>index f8ce047..7c8b917 100644</span><br><span>--- a/tests/CI/gateTestGroups.json</span><br><span>+++ b/tests/CI/gateTestGroups.json</span><br><span>@@ -1,46 +1,46 @@</span><br><span> [</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "ari_a-d ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "ari1",</span><br><span> "dir": "tests/CI/output/ari1",</span><br><span> "testcmd": "--test-regex=tests/rest_api/[Ca-d]"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "ari_e-z ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "ari2",</span><br><span> "dir": "tests/CI/output/ari2",</span><br><span> "testcmd": "--test-regex=tests/rest_api/[e-z]"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "pjsip_a-f",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "pjs1",</span><br><span> "dir": "tests/CI/output/pjsip1",</span><br><span> "testcmd": "--test-regex=tests/channels/pjsip/[a-f]"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "pjsip_g-r",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "pjs2",</span><br><span> "dir": "tests/CI/output/pjsip2",</span><br><span> "testcmd": "--test-regex=tests/channels/pjsip/[g-r]"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "pjsip_s-z",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "pjs3",</span><br><span> "dir": "tests/CI/output/pjsip3",</span><br><span> "testcmd": "--test-regex=tests/channels/pjsip/[s-z]"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "sip_a-r ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "sip1",</span><br><span> "dir": "tests/CI/output/sip1",</span><br><span> "testcmd": "--test-regex=tests/channels/SIP/[Sa-r]"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "sip_s-z ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "sip2",</span><br><span> "dir": "tests/CI/output/sip2",</span><br><span> "testcmd": "--test-regex=tests/channels/SIP/[s-z]"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "iax2_locl",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "iax ",</span><br><span> "dir": "tests/CI/output/iax2_local",</span><br><span> "testcmd": " -t tests/channels/iax2 -t tests/channels/local"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "pjsip_mwi",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "mwi ",</span><br><span> "dir": "tests/CI/output/extmwi",</span><br><span> "testcmd": "--test-regex=tests/channels/pjsip/.*mwi"</span><br><span> }</span><br><span>diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile</span><br><span>index 7df6a8e..0705ab7 100644</span><br><span>--- a/tests/CI/gates.jenkinsfile</span><br><span>+++ b/tests/CI/gates.jenkinsfile</span><br><span>@@ -108,12 +108,13 @@</span><br><span> def dockerOptions = "--ulimit core=0 --ulimit nofile=10240 " +</span><br><span> " -v /srv/jenkins:/srv/jenkins:rw -v /srv/cache:/srv/cache:rw " +</span><br><span> " --entrypoint=''"</span><br><span style="color: hsl(120, 100%, 40%);">+ def bt = env.BUILD_TAG.replaceAll(/[^a-zA-Z0-9_.-]/, '-')</span><br><span> def outputdir = "tests/CI/output/Testsuite"</span><br><span> def img = docker.image(randomImage)</span><br><span> img.pull()</span><br><span> </span><br><span> stage ("Build") {</span><br><span style="color: hsl(0, 100%, 40%);">- img.inside(dockerOptions + " --name ${BUILD_TAG}-build") {</span><br><span style="color: hsl(120, 100%, 40%);">+ img.inside(dockerOptions + " --name ${bt}-build") {</span><br><span> echo 'Building..'</span><br><span> env.CCACHE_DIR = "/srv/cache/ccache"</span><br><span> sh "./tests/CI/buildAsterisk.sh --output-dir=${outputdir} --cache-dir=/srv/cache"</span><br><span>@@ -139,7 +140,7 @@</span><br><span> parallelTasks[groupName] = {</span><br><span> stage (groupName) {</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- img.inside("${dockerOptions} --name ${BUILD_TAG}-${groupName}") {</span><br><span style="color: hsl(120, 100%, 40%);">+ img.inside("${dockerOptions} --name ${bt}-${groupName}") {</span><br><span> </span><br><span> lock("${JOB_NAME}.${NODE_NAME}.installer") {</span><br><span> sh 'sudo ./tests/CI/installAsterisk.sh --user-group=jenkins:users'</span><br><span>diff --git a/tests/CI/periodic-dailyTestGroups.json b/tests/CI/periodic-dailyTestGroups.json</span><br><span>index 4e60ba0..b8c8e9b 100644</span><br><span>--- a/tests/CI/periodic-dailyTestGroups.json</span><br><span>+++ b/tests/CI/periodic-dailyTestGroups.json</span><br><span>@@ -1,31 +1,31 @@</span><br><span> [</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "ari ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "ari ",</span><br><span> "dir": "tests/CI/output/ari",</span><br><span> "testcmd": "-t tests/rest_api/"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "pjsip ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "pjs ",</span><br><span> "dir": "tests/CI/output/pjsip",</span><br><span> "testcmd": "-t tests/channels/pjsip"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "sip ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "sip ",</span><br><span> "dir": "tests/CI/output/sip",</span><br><span> "testcmd": "-t tests/channels/SIP"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "iax2_locl",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "iax ",</span><br><span> "dir": "tests/CI/output/iax2_local",</span><br><span> "testcmd": " -t tests/channels/iax2 -t tests/channels/local"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "agi-apps ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "apps",</span><br><span> "dir": "tests/CI/output/agi-apps",</span><br><span> "testcmd": " -t tests/agi -t tests/apps -t blind-transfer-parkingtimeout"</span><br><span> },</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- "name": "other ",</span><br><span style="color: hsl(120, 100%, 40%);">+ "name": "othr",</span><br><span> "dir": "tests/CI/output/other",</span><br><span> "testcmd": " -T tests/(apps|agi|blind-transfer-parkingtimeout|rest_api|channels|realtime|example|skeleton_test|remote-test)"</span><br><span> }</span><br><span>diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile</span><br><span>index b84334a..fd9fa6b 100644</span><br><span>--- a/tests/CI/periodics-daily.jenkinsfile</span><br><span>+++ b/tests/CI/periodics-daily.jenkinsfile</span><br><span>@@ -38,12 +38,13 @@</span><br><span> def dockerOptions = "--ulimit core=0 --ulimit nofile=10240 " +</span><br><span> " -v /srv/jenkins:/srv/jenkins:rw -v /srv/cache:/srv/cache:rw " +</span><br><span> " --entrypoint=''"</span><br><span style="color: hsl(120, 100%, 40%);">+ def bt = env.BUILD_TAG.replaceAll(/[^a-zA-Z0-9_.-]/, '-')</span><br><span> def outputdir = "tests/CI/output/Testsuite"</span><br><span> def img = docker.image(randomImage)</span><br><span> img.pull()</span><br><span> </span><br><span> stage ("Build") {</span><br><span style="color: hsl(0, 100%, 40%);">- img.inside(dockerOptions + " --name ${BUILD_TAG}-build") {</span><br><span style="color: hsl(120, 100%, 40%);">+ img.inside(dockerOptions + " --name ${bt}-build") {</span><br><span> echo 'Building..'</span><br><span> env.CCACHE_DIR = "/srv/cache/ccache"</span><br><span> sh "./tests/CI/buildAsterisk.sh --output-dir=${outputdir} --cache-dir=/srv/cache"</span><br><span>@@ -69,7 +70,7 @@</span><br><span> parallelTasks[groupName] = {</span><br><span> stage (groupName) {</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- img.inside("${dockerOptions} --name ${BUILD_TAG}-${groupName}") {</span><br><span style="color: hsl(120, 100%, 40%);">+ img.inside("${dockerOptions} --name ${bt}-${groupName}") {</span><br><span> </span><br><span> lock("${JOB_NAME}.${NODE_NAME}.installer") {</span><br><span> sh 'sudo ./tests/CI/installAsterisk.sh --user-group=jenkins:users'</span><br><span>diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile</span><br><span>index d9f28e7..83fd462 100644</span><br><span>--- a/tests/CI/unittests.jenkinsfile</span><br><span>+++ b/tests/CI/unittests.jenkinsfile</span><br><span>@@ -106,13 +106,12 @@</span><br><span> def r = currentBuild.startTimeInMillis % images.length</span><br><span> def ri = images[(int)r]</span><br><span> def randomImage = env.DOCKER_REGISTRY + "/" + ri;</span><br><span style="color: hsl(120, 100%, 40%);">+ def bt = env.BUILD_TAG.replaceAll(/[^a-zA-Z0-9_.-]/, '-')</span><br><span> def dockerOptions = "--ulimit core=0 --ulimit nofile=10240 " +</span><br><span> " -v /srv/jenkins:/srv/jenkins:rw -v /srv/cache:/srv/cache:rw " +</span><br><span style="color: hsl(0, 100%, 40%);">- " --entrypoint='' --name ${BUILD_TAG}-build"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+ " --entrypoint='' --name ${bt}-build"</span><br><span> def outputdir = "tests/CI/output/UnitTests"</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> def img = docker.image(randomImage)</span><br><span> img.pull()</span><br><span> img.inside(dockerOptions) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9439">change 9439</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/9439"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I3a4b8a4a9c488ddabf9daf651dc1334222056f38 </div>
<div style="display:none"> Gerrit-Change-Number: 9439 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>