-
Notifications
You must be signed in to change notification settings - Fork 280
53 lines (51 loc) · 2.33 KB
/
openqa.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
name: Run a basic openQA test
# yamllint disable-line rule:truthy
on:
pull_request_target:
# Note how this runs on:pull_request_target and not on:pull_request!
# The difference is that this runs always with the context of the master
# branch. This is necessary to allow accessing the API credential secrets.
workflow_dispatch:
env:
OPENQA_HOST: ${{ vars.OPENQA_URL }}
OPENQA_API_KEY: ${{ secrets.OPENQA_API_KEY }}
OPENQA_API_SECRET: ${{ secrets.OPENQA_API_SECRET }}
GH_REPO: ${{ github.event.pull_request.head.repo.full_name }}
GH_REF: ${{ github.event.pull_request.head.ref }}
GH_PR_BODY: ${{ github.event.pull_request.body }}
GH_PR_HTML_URL: ${{ github.event.pull_request.html_url }}
jobs:
trigger_and_monitor_openqa:
runs-on: ubuntu-latest
container:
image: registry.opensuse.org/devel/openqa/containers/tumbleweed:client
steps:
- uses: actions/checkout@v4
- name: Determine the latest Tumbleweed build on o3
id: latest_build
run: >-
echo build=$(openqa-cli api
--host ${OPENQA_HOST:-https://openqa.opensuse.org}
job_groups/${OPENQA_BUILD_LOOKUP_GROUP_ID:-1}/build_results only_tagged=1
| jq -e -r '[ .build_results[] | select(.tag.description=="published") | .build ][0]'
) >> "$GITHUB_OUTPUT"
- name: Trigger and monitor a basic openQA test on o3
run: >-
openqa-cli schedule
--monitor
--host "${OPENQA_HOST:-https://openqa.opensuse.org}/"
--apikey "$OPENQA_API_KEY" --apisecret "$OPENQA_API_SECRET"
--param-file SCENARIO_DEFINITIONS_YAML=scenario-definitions.yaml
DISTRI=openSUSE VERSION=Tumbleweed FLAVOR=github ARCH=x86_64
HDD_1=opensuse-Tumbleweed-x86_64-${{ steps.latest_build.outputs.build }}[email protected]
UEFI_PFLASH_VARS=opensuse-Tumbleweed-x86_64-${{ steps.latest_build.outputs.build }}[email protected]
BUILD="$GH_REPO.git#$GH_REF" _GROUP_ID="${OPENQA_SCHEDULE_GROUP_ID:-118}"
CASEDIR="$GITHUB_SERVER_URL/$GH_REPO.git#$GH_REF"
clone_mentioned_job:
runs-on: ubuntu-latest
container:
image: registry.opensuse.org/devel/openqa/containers/tumbleweed:client
steps:
- name: Clone and monitor job mentioned in PR description
uses: os-autoinst/scripts/actions/clone-job@master