canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #06331
[Merge] qa-jenkins-jobs:rf-vm-iso-tests into qa-jenkins-jobs:master
Tim Andersson has proposed merging qa-jenkins-jobs:rf-vm-iso-tests 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/482575
Adds iso testing in a VM with robot framework!
--
Your team Canonical Platform QA Team is requested to review the proposed merge of qa-jenkins-jobs:rf-vm-iso-tests into qa-jenkins-jobs:master.
diff --git a/jobs/robot-framework-iso-testing/jobs.yaml b/jobs/robot-framework-iso-testing/jobs.yaml
new file mode 100644
index 0000000..d4299e1
--- /dev/null
+++ b/jobs/robot-framework-iso-testing/jobs.yaml
@@ -0,0 +1,89 @@
+---
+# vim: sw=4 ts=4 et
+
+# QA Jenkins Jobs
+# Copyright 2016 Canonical Ltd.
+
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 3, as published
+# by the Free Software Foundation.
+
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranties of
+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The project stanza describes all jobs and parameters
+
+
+# Potential future improvements:
+# - throttle concurrent builds
+# - lockable resources
+# - exclusion
+
+- project:
+ name: 'robot-framework-iso-testing'
+ release:
+ - 'noble'
+ test_case:
+ - 'entire-disk'
+ jobs:
+ - 'robot-framework-{release}-desktop-{test_case}'
+
+- job-template:
+ name: 'robot-framework-{release}-desktop-{test_case}'
+ description: |
+ Runs a test case on a VM
+ parameters:
+ - string:
+ name: HIT_BRANCH
+ default: 'main'
+ description: branch of HIT to run tests from
+ wrappers:
+ - timeout:
+ timeout: 60 # Needs to be long, in the case that multiple installer tests are in front in the queue
+ fail: true
+ - workspace-cleanup
+ - timestamps
+ - credentials-binding:
+ - text:
+ credential-id: GH_PAT
+ variable: GH_PAT
+ builders:
+ - clear-artifacts
+ - shell:
+ command: |
+ #!/bin/bash
+ set -ex
+ # TEST_ID={test_case}
+ wget $URL
+ # # determine ISO url
+ development_release=$(distro-info --devel || echo UNKNOWN)
+ if [ {release} = $development_release ]; then
+ ISO_URL="https://cdimage.ubuntu.com/daily-live/current/{release}-desktop-amd64.iso"
+ else
+ ISO_URL="https://cdimage.ubuntu.com/{release}/daily-live/current/{release}-desktop-amd64.iso"
+ fi
+ ISO_NAME='{release}-desktop-amd64.iso'
+ wget $ISO_URL
+ # clone HIT and yarf
+ 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 -b main https://oauth2:$GH_PAT@xxxxxxxxxx/canonical/yarf.git
+ # set up venv
+ sudo apt install -y clang libxkbcommon-dev tesseract-ocr
+ cd yarf/
+ uv sync
+ uv pip install .[develop]
+ . .venv/bin/activate
+ cd ../hardware-installer-testing
+ # maybe this isn't needed...
+ pip install -r requirements.txt
+ ./runner/spawn_and_run_test_suite.py --test-suite robot/test-cases/{test_case} --iso-path ../$ISO_NAME --qemu-args-json ./runner/qemu-args.json
+ publishers:
+ - archive:
+ artifacts: 'hardware-installer-testing/artifacts/*'
+ allow-empty: 'true'
+
Follow ups