<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/11682">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Friendly Automation: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CI: Make node labels job-specific<br><br>Originally, the eligible nodes for a job were labelled only by<br>"swdev-docker". So basically any node could run any job. We had<br>found that allowing a node to run more than 1 gate at a time was<br>problematic so we limited the nodes to processing 1 job at a time.<br>With the creation of the Asterisk 17 branches however, we now have<br>so many active branches that getting checks and gates through in<br>a timely manner is problematic when a node can run only 1 job<br>at a time.<br><br>Now the nodes are also labelled by the job type they can run.<br>For instance: "testsuite-check", "testsuite-gate", etc. With the<br>"Throttle Concurrent Builds" plugin, we can now allow a node to<br>run more than 1 job BUT throttle by job type. For instance:<br> Allow 2 jobs but only 1 testsuite-gate at a time.<br>Now a node can run 2 checks or 1 check and 1 gate or 1 gate but<br>not 2 gates at a time.<br><br>Change-Id: I9470efdfa716645110d22672178a1ebb5a2b3b5b<br>---<br>M CI/gates.jenkinsfile<br>M CI/unittests.jenkinsfile<br>2 files changed, 10 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/CI/gates.jenkinsfile b/CI/gates.jenkinsfile</span><br><span>index 187eb74..26e30de 100644</span><br><span>--- a/CI/gates.jenkinsfile</span><br><span>+++ b/CI/gates.jenkinsfile</span><br><span>@@ -44,7 +44,7 @@</span><br><span> }</span><br><span> agent {</span><br><span> /* All of the stages need to be performed on a docker host */</span><br><span style="color: hsl(0, 100%, 40%);">- label "swdev-docker"</span><br><span style="color: hsl(120, 100%, 40%);">+ label "testsuite-gate"</span><br><span> }</span><br><span> </span><br><span> stages {</span><br><span>@@ -111,7 +111,7 @@</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(0, 100%, 40%);">- </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> 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>@@ -123,7 +123,7 @@</span><br><span> def img = docker.image(randomImage)</span><br><span> img.pull()</span><br><span> img.inside(dockerOptions) {</span><br><span style="color: hsl(0, 100%, 40%);">- def asteriskUrl = env.GERRIT_PROJECT_URL.replaceAll(/\/(Security-)?[^\/]+$/, "/\$1asterisk") </span><br><span style="color: hsl(120, 100%, 40%);">+ def asteriskUrl = env.GERRIT_PROJECT_URL.replaceAll(/\/(Security-)?[^\/]+$/, "/\$1asterisk")</span><br><span> checkout scm: [$class: 'GitSCM',</span><br><span> branches: [[name: "${BRANCH_NAME}"]],</span><br><span> extensions: [</span><br><span>@@ -137,7 +137,7 @@</span><br><span> ],</span><br><span> userRemoteConfigs: [[name: env.GERRIT_NAME, url: asteriskUrl]]</span><br><span> ]</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> stage ('Build') {</span><br><span> echo 'Building..'</span><br><span> </span><br><span>@@ -145,7 +145,7 @@</span><br><span> cd ${astDir}</span><br><span> ./tests/CI/buildAsterisk.sh --output-dir=${env.WORKSPACE}/${outputDir} --cache-dir=/srv/cache</span><br><span> sudo ./tests/CI/installAsterisk.sh --user-group=jenkins:users</span><br><span style="color: hsl(0, 100%, 40%);">- """ </span><br><span style="color: hsl(120, 100%, 40%);">+ """</span><br><span> }</span><br><span> stage ('Test') {</span><br><span> sh "./self_test"</span><br><span>diff --git a/CI/unittests.jenkinsfile b/CI/unittests.jenkinsfile</span><br><span>index 33be6b0..943c1d0 100644</span><br><span>--- a/CI/unittests.jenkinsfile</span><br><span>+++ b/CI/unittests.jenkinsfile</span><br><span>@@ -47,7 +47,7 @@</span><br><span> }</span><br><span> agent {</span><br><span> /* All of the stages need to be performed on a docker host */</span><br><span style="color: hsl(0, 100%, 40%);">- label "swdev-docker"</span><br><span style="color: hsl(120, 100%, 40%);">+ label "testsuite-check"</span><br><span> }</span><br><span> </span><br><span> stages {</span><br><span>@@ -114,7 +114,7 @@</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(0, 100%, 40%);">- </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> 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>@@ -126,7 +126,7 @@</span><br><span> def img = docker.image(randomImage)</span><br><span> img.pull()</span><br><span> img.inside(dockerOptions) {</span><br><span style="color: hsl(0, 100%, 40%);">- def asteriskUrl = env.GERRIT_PROJECT_URL.replaceAll(/\/(Security-)?[^\/]+$/, "/\$1asterisk") </span><br><span style="color: hsl(120, 100%, 40%);">+ def asteriskUrl = env.GERRIT_PROJECT_URL.replaceAll(/\/(Security-)?[^\/]+$/, "/\$1asterisk")</span><br><span> checkout scm: [$class: 'GitSCM',</span><br><span> branches: [[name: "${BRANCH_NAME}"]],</span><br><span> extensions: [</span><br><span>@@ -140,7 +140,7 @@</span><br><span> ],</span><br><span> userRemoteConfigs: [[name: env.GERRIT_NAME, url: asteriskUrl]]</span><br><span> ]</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> stage ('Build') {</span><br><span> echo 'Building..'</span><br><span> </span><br><span>@@ -148,7 +148,7 @@</span><br><span> cd ${astDir}</span><br><span> ./tests/CI/buildAsterisk.sh --output-dir=${env.WORKSPACE}/${outputDir} --cache-dir=/srv/cache</span><br><span> sudo ./tests/CI/installAsterisk.sh --user-group=jenkins:users</span><br><span style="color: hsl(0, 100%, 40%);">- """ </span><br><span style="color: hsl(120, 100%, 40%);">+ """</span><br><span> }</span><br><span> stage ('Test') {</span><br><span> sh "./self_test"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/11682">change 11682</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/c/testsuite/+/11682"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I9470efdfa716645110d22672178a1ebb5a2b3b5b </div>
<div style="display:none"> Gerrit-Change-Number: 11682 </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: Friendly Automation </div>
<div style="display:none"> Gerrit-MessageType: merged </div>