[openqa-tests/sam/machine] Move all machine config into `POST isos/` call




commit 46f598dd035248879212361fd9324fb30470a4d6
Author: Sam Thursfield <sam thursfield codethink co uk>
Date:   Thu Oct 6 15:59:24 2022 +0200

    Move all machine config into `POST isos/` call
    
    Setting machine config in the call to `POST machines/` is not useful.
    The config is set up correctly on the new machine. But the tests
    run against the machine `qemu_x86_64` that's predefined on
    openqa.gnome.org, and we can't override that. (Setting `MACHINE` when
    starting the job makes the job fail to start).
    
    We should have config in Git as much as possible, so, I have removed
    config from the predefined `qemu_x86_64` machine and we now set it
    in the `start_job.sh` script that calls `POST isos/`.
    
    See: http://open.qa/docs/#_variable_precedence

 utils/setup_worker.sh |  8 --------
 utils/start_job.sh    | 18 +++++++++++++-----
 2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/utils/setup_worker.sh b/utils/setup_worker.sh
index 1678c66..664c6a5 100755
--- a/utils/setup_worker.sh
+++ b/utils/setup_worker.sh
@@ -24,12 +24,4 @@ openqa-cli api --apikey $OPENQA_API_KEY --apisecret $OPENQA_API_SECRET \
   -X POST machines/ \
   name=gitlab-runner-$worker_class \
   backend=qemu \
-  settings[ARCH]=x86_64 \
-  settings[PART_TABLE_TYPE]=gpt \
-  settings[QEMUCPU]=host \
-  settings[QEMUCPUS]=2 \
-  settings[QEMURAM]=2560 \
-  settings[QEMUVGA]=virtio \
-  settings[UEFI]=1 \
-  settings[UEFI_PFLASH_CODE]=/usr/share/qemu/ovmf-x86_64-code.bin \
   settings[WORKER_CLASS]=$worker_class | tee --append openqa.log | jq -e .id > /tmp/machine_id
diff --git a/utils/start_job.sh b/utils/start_job.sh
index 5034a5f..f9d8778 100755
--- a/utils/start_job.sh
+++ b/utils/start_job.sh
@@ -12,11 +12,19 @@ version=$2
 openqa-cli api --apikey $OPENQA_API_KEY --apisecret $OPENQA_API_SECRET \
   --host $OPENQA_HOST \
   -X POST isos \
-  ISO=installer.iso \
+  ARCH=x86_64 \
+  CASEDIR=$(pwd) \
   DISTRI=gnomeos \
-  VERSION=$version \
   FLAVOR=iso \
-  ARCH=x86_64 \
+  ISO=installer.iso \
+  NEEDLES_DIR=$OPENQA_NEEDLES_GIT#$OPENQA_NEEDLES_BRANCH \
+  PART_TABLE_TYPE=gpt \
+  QEMUCPU=host \
+  QEMUCPUS=2 \
+  QEMURAM=2560 \
+  QEMUVGA="virtio-vga" \
+  UEFI=1 \
+  UEFI_PFLASH_CODE=/usr/share/qemu/ovmf-x86_64-code.bin \
+  VERSION=$version \
   WORKER_CLASS=$worker_class \
-  CASEDIR=$(pwd) \
-  NEEDLES_DIR=$OPENQA_NEEDLES_GIT#$OPENQA_NEEDLES_BRANCH | tee --append openqa.log | jq -e .ids[0]
+  | tee --append openqa.log | jq -e .ids[0]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]