← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] qa-jenkins-jobs:hit-amendments into qa-jenkins-jobs:master

 

Tim Andersson has proposed merging qa-jenkins-jobs:hit-amendments into qa-jenkins-jobs:master.

Requested reviews:
  Canonical Platform QA Team (canonical-platform-qa)

For more details, see:
https://code.launchpad.net/~canonical-platform-qa/qa-jenkins-jobs/+git/qa-jenkins-jobs/+merge/480797

fixes for HIT
-- 
Your team Canonical Platform QA Team is requested to review the proposed merge of qa-jenkins-jobs:hit-amendments into qa-jenkins-jobs:master.
diff --git a/jobs/hardware-iso-testing/jobs.yaml b/jobs/hardware-iso-testing/jobs.yaml
index 7010075..b37eb52 100644
--- a/jobs/hardware-iso-testing/jobs.yaml
+++ b/jobs/hardware-iso-testing/jobs.yaml
@@ -43,11 +43,11 @@
         - 'oem-install'
         - 'entire-disk-with-nvidia-drivers'
     jobs:
-        - 'hit-{release}-dut-test-case-mapping'
+        - 'hit-{release}-test-case-dut-mapping'
         - 'hit-{release}-desktop-{test_case}'
 
 - job-template:
-    name: 'hit-{release}-dut-test-case-mapping'
+    name: 'hit-{release}-test-case-dut-mapping'
     description: |
         Maps a test case to a DUT id - preferring to do so in a manner to parallelise as much as poss
     parameters:
@@ -74,14 +74,14 @@
                 check-content:
                   - text:
                       - '^{{release}}-.*.iso .+$'
-
     wrappers:
       - timestamps
       - timeout:
           timeout: 15
           fail: true
     builders:
-        - python: |
+        - shell: |
+            #!/usr/bin/python3
             import os
             import json
             import random
@@ -96,25 +96,25 @@
                 if len(duts) == 0:
                     duts = used_duts
                     used_duts = []
-                duts = random.shuffle(duts)
+                random.shuffle(duts)
                 idx = random.randrange(len(duts))
                 op_json[test_cases[0]] = duts[idx]
                 used_duts.append(duts[idx])
                 del duts[idx]
                 del test_cases[0]
-            with open("{release}-dut-test-case-mapping.json", "w") as f:
+            with open("{release}-test-case-dut-mapping.json", "w") as f:
                 json.dump(op_json, f)
     publishers:
         - archive:
-            artifacts: '{release}-dut-test-case-mapping.json'
+            artifacts: '{release}-test-case-dut-mapping.json'
 
 - job-template:
     name: 'hit-{release}-desktop-{test_case}'
     description: |
-        Runs a test case on a DUT as specified by dut-test-case-mapping
+        Runs a test case on a DUT as specified by test-case-dut-mapping
     triggers:
         - reverse:
-            jobs: '{release}-dut-test-case-mapping'
+            jobs: 'hit-{release}-test-case-dut-mapping'
             result: success
     parameters:
       - string:
@@ -129,14 +129,14 @@
               variable: GH_PAT
     builders:
         - copyartifact:
-            project: '{release}-dut-test-case-mapping'
-            filter: '{release}-dut-test-case-mapping.json'
+            project: 'hit-{release}-test-case-dut-mapping'
+            filter: '{release}-test-case-dut-mapping.json'
             which-build: last-successful
         - shell: |
             #!/bin/bash
             set -ex
             # get DUT_ID
-            DUT_ID=$(jq -r '."{test_case}"' {release}-dut-test-case-mapping.json)
+            DUT_ID=$(jq -r '."{test_case}"' {release}-test-case-dut-mapping.json)
             # clone HIT and testflinger
             retry -t 3 -d 180 -- git clone -b $HIT_BRANCH https://oauth2:$GH_PAT@xxxxxxxxxx/canonical/hardware-installer-testing.git
             retry -t 3 -d 180 -- git clone https://github.com/canonical/testflinger

Follow ups