Add verification run scheduler
What?
Add a script which wraps the standard use cases for openqa-clone-custom-git-refspec into a more usable form. Instead of requiring the user to type out the URLs of the openqa.opensuse.org test they want to use it injects all information - like the PR number, base test ID, test modules to load, etc. - into a openqa-clone-custom-git-refspec call.
This script itself does not implement new functionality or behaviour, but is simply a different "front-end" - with a more descriptive name - to use for quickly scheduling verification runs for PRs against e.g os-autoinst.
This is just a thought experiment and could theoretically be integrated into other components without the need for a separate script.
How?
Several parameters are mandatory for the script to function:
-
$SOURCE- Which specifies whether to useopenqa.opensuse.orgoropenqa.suse.de(with custom targets potentially supported via config file) -
$PR_ID- The ID the GitHub PR -
$BASE_TEST_ID- The ID of the test the user wants to use as a base -
$[test/module,...]- A comma sperated list of test modules to load -
$TEST_NAME- TheTESTparameter for the call
The GitHub access token is provided via a config file at ~/.config/gh.conf (name temporary).
Why?
This PR aims to lower the barrier of entry for new contributors and make general test writing easier by having a easy-to-use, descriptively named script a user can call to provide a run for their PR. Instead of going around trying to find the right command.
Following the discussion slack:
- This could be integrated inside clone-custom-git-refspec directly. That’s more due to how we already work, and I fear introducing a new script might not be 100% the best idea, but its a start already
- The handling of github tokens is a great adition!
- on the spec file, perhaps once we figure out what to do, it could be aliased to
openqa-verify-pror a nice short name :D (becauseopenqa-clone-custom-git-refspecis... well, a bit long
Please capitalize the first letter of the commit message subject lines. It would also be much nicer if openqa-verify_pr was openqa-verify-pr. The formatting of the help text and general coding style is unfortunately not in-line with what we generally use in our scripts. I would at least add a set -e or perhaps even set -eux -o pipefail at the beginning.
Note that additional scripts could also be added to https://github.com/os-autoinst/scripts - although if it is supposed to be distributed via an RPM package keeping it here might be the better option.
Thanks for your feedback, I have changed the name and added the set -o pipefail line. Could you elaborate a bit on what you mean with "general coding style"? What do I need to do differently?
Thanks :)
This pull request is now in conflicts. Could you fix it? 🙏
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.