Skip to content

Commit

Permalink
Merge pull request #252 from os-autoinst/osukup/poo132335
Browse files Browse the repository at this point in the history
Modify trigger_openqa_in_openqa to use scenarios
  • Loading branch information
mergify[bot] committed Aug 10, 2023
2 parents 58938bc + 278fdfb commit 43e95cc
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions trigger-openqa_in_openqa
Expand Up @@ -21,10 +21,12 @@ machine="${machine:-"64bit"}"
build_tag=${BUILD_TAG:-}
client_prefix=${client_prefix:-}
full_run=${FULL:-}
group_id="${group_id:-"openQA"}"

main() {
[ "$dry_run" = "1" ] && client_prefix="echo"
local qcow build
download_scenario
download_latest_published_tumbleweed_image
trigger
}
Expand All @@ -41,6 +43,11 @@ download_latest_published_tumbleweed_image() {
build=$(echo "$build_tag" | sed -e "s/jenkins-trigger-openQA_in_openQA-/:/" -e "s/-/./g")
}

download_scenario() {
rm -f /var/tmp/sd.yaml
curl https://raw.githubusercontent.com/os-autoinst/os-autoinst-distri-openQA/master/scenario-definitions.yaml -o /var/tmp/sd.yaml
}

trigger() {
# prevent host access problem when running within o3 infrastructure
# where o3 is not reachable over https
Expand All @@ -54,18 +61,14 @@ trigger() {
fi

${client_prefix} "${openqa_cli}" \
api --host "${target_host_proto}://${target_host}" -X POST isos \
schedule --host "${target_host_proto}://${target_host}" \
--param-file SCENARIO_DEFINITIONS_YAML=/var/tmp/sd.yaml \
VERSION=Tumbleweed \
DISTRI=openQA FLAVOR=dev\
ARCH="${arch}" BACKEND=qemu WORKER_CLASS=qemu_x86_64 \
HDD_1="$qcow" BUILD="${build}" \
DISTRI=openqa FLAVOR=dev\
ARCH="${arch}"\
HDD_1="$qcow" BUILD="${build}" _GROUP="${group_id}" \
"${ARGS[@]}" \
| tee job_post_response

echo 'Triggered as:'
for job_id in $(job_ids job_post_response); do
echo " - ${target_host_proto}://${target_host}/tests/${job_id}"
done
}

main

0 comments on commit 43e95cc

Please sign in to comment.