<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11280">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Friendly Automation: Looks good to me, approved
George Joseph: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CI: Move test group config files to Jenkins<br><br>One of the downaides of having things like test configuration<br>in the git repo is that it can't be changed at runtime. You have<br>to create a review for the changes and merge it mefore it will<br>take effect.<br><br>This review moves the data currently held in<br>tests/CI/periodic-dailyTestGroups.json and<br>tests/CI/gateTestGroups.json into a Jenkins Config File attached<br>to the job definitions. This allows us to alter it from the<br>Jenkins UI at runtime. The original files stay in the repo<br>as documentation.<br><br>Change-Id: I14b9702f6285ce1fb2420287ba0e7d3b59109763<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>4 files changed, 29 insertions(+), 2 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 d048896..415a7d7 100644</span><br><span>--- a/tests/CI/gateTestGroups.json</span><br><span>+++ b/tests/CI/gateTestGroups.json</span><br><span>@@ -1,3 +1,10 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is for reference/documentation only.</span><br><span style="color: hsl(120, 100%, 40%);">+ * The live configuration is defined in the Config Files</span><br><span style="color: hsl(120, 100%, 40%);">+ * settings of the Asterisk Gates Jenkins job.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This allows is to alter the parameters at runtime.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> [</span><br><span> {</span><br><span> "name": "ari1",</span><br><span>diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile</span><br><span>index bc23781..a90b0cf 100644</span><br><span>--- a/tests/CI/gates.jenkinsfile</span><br><span>+++ b/tests/CI/gates.jenkinsfile</span><br><span>@@ -159,7 +159,16 @@</span><br><span> }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- def testGroups = readJSON file: "tests/CI/gateTestGroups.json"</span><br><span style="color: hsl(120, 100%, 40%);">+ def testGroups</span><br><span style="color: hsl(120, 100%, 40%);">+ configFileProvider([configFile(fileId: 'asterisk_gate_test_groups', variable: 'GATE_TEST_GROUPS')]) {</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "Retrieved config file from ${env.GATE_TEST_GROUPS}"</span><br><span style="color: hsl(120, 100%, 40%);">+ testGroups = readJSON file: env.GATE_TEST_GROUPS</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "Running test groups:"</span><br><span style="color: hsl(120, 100%, 40%);">+ for (def testGroup in testGroups) {</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "${testGroup.name} ${testGroup.dir} ${testGroup.testcmd}"</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> def parallelTasks = [ : ]</span><br><span> </span><br><span> for (def testGroup in testGroups) {</span><br><span>diff --git a/tests/CI/periodic-dailyTestGroups.json b/tests/CI/periodic-dailyTestGroups.json</span><br><span>index 7f0fd7e..cc837f6 100644</span><br><span>--- a/tests/CI/periodic-dailyTestGroups.json</span><br><span>+++ b/tests/CI/periodic-dailyTestGroups.json</span><br><span>@@ -1,3 +1,9 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is for reference/documentation only.</span><br><span style="color: hsl(120, 100%, 40%);">+ * The live configuration is defined in the Config Files</span><br><span style="color: hsl(120, 100%, 40%);">+ * settings of the Asterisk Gates Jenkins job.</span><br><span style="color: hsl(120, 100%, 40%);">+ * This allows is to alter the parameters at runtime.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span> [</span><br><span> {</span><br><span> "name": "ari ",</span><br><span>diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile</span><br><span>index ae762f8..ae5a5f4 100644</span><br><span>--- a/tests/CI/periodics-daily.jenkinsfile</span><br><span>+++ b/tests/CI/periodics-daily.jenkinsfile</span><br><span>@@ -91,7 +91,12 @@</span><br><span> }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- def testGroups = readJSON file: "tests/CI/periodic-dailyTestGroups.json"</span><br><span style="color: hsl(120, 100%, 40%);">+ def testGroups</span><br><span style="color: hsl(120, 100%, 40%);">+ configFileProvider([configFile(fileId: 'asterisk_daily_test_groups', variable: 'DAILY_TEST_GROUPS')]) {</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "Retrieved config file from ${env.DAILY_TEST_GROUPS}"</span><br><span style="color: hsl(120, 100%, 40%);">+ testGroups = readJSON file: env.DAILY_TEST_GROUPS</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> def parallelTasks = [ : ]</span><br><span> </span><br><span> for (def testGroup in testGroups) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11280">change 11280</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/asterisk/+/11280"/><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-Change-Id: I14b9702f6285ce1fb2420287ba0e7d3b59109763 </div>
<div style="display:none"> Gerrit-Change-Number: 11280 </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: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>