Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,68 @@ environment variables:
* `from_email` - The From address for notification emails
* `force_result` - If set to `1` tickets in the [tracker openqa-force-result](https://progress.opensuse.org/projects/openqav3/issues?query_id=700) can override job results

## Auto submission scripts for `devel:openQA`

There are three scripts/pipelines responsible for managing submissions in OBS:
* Trigger: `trigger-openqa_in_openqa`
* Monitor: `monitor-openqa_job`
* Submit: `os-autoinst-obs-auto-submit` / `cleanup-obs-project`

They are called in [Jenkins](http://jenkins.qa.suse.de/)

There are three projects in OBS:
* [devel:openQA](https://build.opensuse.org/project/show/devel:openQA)
* [devel:openQA:testing](https://build.opensuse.org/project/show/devel:openQA:testing)
* [devel:openQA:tested](https://build.opensuse.org/project/show/devel:openQA:tested)

[devel:openQA](https://build.opensuse.org/project/show/devel:openQA) is the
project where the packages are automatically updated with every commit in git.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe an explanation of devel:openQA:testing here in the middle would be good:

Suggested change
[devel:openQA:testing](https://build.opensuse.org/project/show/devel:openQA:testing) contains
packages currently being tested for submission to `openSUSE:Factory` and potentially other targets
(via `devel:openQA:tested`, see next paragraph). It is only updated by the submission scripts themselves
to remain otherwise unchanged while tests are running and a submission is prepared. (If we would
submit directly from `devel:openQA` we might submit packages that have already changed since tests
were executed so we would not necessarily submit what we have tested.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like that would be also nice 👍

[devel:openQA:tested](https://build.opensuse.org/project/show/devel:openQA:tested)
contains the devel projects for `openSUSE:Factory`. They should always be
present and can be created like this:

```
osc linkpac openSUSE:Factory openQA devel:openQA:tested
osc changedevelrequest openSUSE:Factory openQA devel:openQA:tested openQA -m "assign a devel project"
osc linktobranch devel:openQA:tested openQA
```

### `trigger-openqa_in_openqa`

This script is called first. Its primary purpose is to regularly schedule
[`os-autoinst-distri-openqa` tests](https://openqa.opensuse.org/group_overview/24)
using `devel:openQA`. The monitor and autosubmit pipeline will be called
but having no effect.

Only if there are no packages in `devel:openQA:testing`, it will `osc release`
all packages present in `devel:openQA:tested` from `devel:openQA` to
`devel:openQA:testing`.

Then it triggers `os-autoinst-distri-openqa` tests using `devel:openQA:testing`,
logging to `job_post_response`.

### `monitor-openqa_job`

This monitors `job_post_response` until all jobs are finished. If all jobs
passed, the auto submit pipeline will be run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the auto submit pipeline (aka os-autoinst-obs-auto-submit) runs anyway if I am not wrong. it just doesnt do anything. or is it actual skipped if monitoring script failed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the monitoring pipeline fails, the following pipeline is not run


Otherwise, it will delete packages from `devel:openQA:testing` again and
return an error.

### `os-autoinst-obs-auto-submit`

This script will copy contents from each `devel:openQA` package to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will copy packages from devel:openQA:testing, right? Otherwise we might submit something we haven't tested (as new packages might have already ended up in devel:openQA).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is really confusing though:

https://github.com/os-autoinst/scripts/blob/master/os-autoinst-obs-auto-submit#L7C1-L7C41

src_project=${src_project:-devel:openQA}

and then only later in the submit function:
https://github.com/os-autoinst/scripts/blob/master/os-autoinst-obs-auto-submit#L231

    if [[ -n $staging_project && $staging_project != none && $staging_project != "$src_project" ]]; then
        src_project=$staging_project
        must_cleanup_staging=1
    fi

If you only look at this line:
https://github.com/os-autoinst/scripts/blob/master/os-autoinst-obs-auto-submit#L202

cp -v "$src_project"/"$package"/* "$dst_project"/"$package"/

then you would think it copies from devel:openQA.

I wonder why it was done this way.

Copy link
Contributor

@Martchus Martchus Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was done this way (probably initially by myself even though the code seems to have gone through quite some changes) because this way I didn't have to change all the lines where src_project is used.

`devel:openQA:tested`, generate the changelog, and
submit the packages to `openSUSE:Factory` and potentially other target
projects.

In order to give reviewers time to review existing submit requests it will not
create new ones in a certain timeframe.

After creating submit requests, it calls `cleanup-obs-project` to delete all
packages in `devel:openQA:testing`.

## Contribute

This project lives in https://github.com/os-autoinst/scripts
Expand Down