Commit graph

698 commits

Author SHA1 Message Date
Yu Ming Zhu
cdbebd963d [hub] add non-host evalPolicy API 2021-08-16 17:55:26 +00:00
Yu Ming Zhu
601cd33902 use scm_ as the prefix instead of scm for scminfo 2021-08-16 17:55:26 +00:00
Yu Ming Zhu
47c4b5d70b kojid: extend SCM.assert_allowed with hub policy
This is a simple extention of `SCM.assert_allowed`

- `assert_allowed_by_policy` will set the default "use_common" to False which is different to the old behavior
- `channel`, `user_id`, `scratch` are passed in the `policy_data` with scminfo right now.

This is a prototype for this change, and there are some other solutions could be implemented too

- Use a scmpolicy plugin as `postSCMCheckout` callback, the pro is that we can do more checks after the source is initialized on builder, meanwhile, the con is that the source will be downloaded even it is denied by policy. It might be a potential risk?
- Do the scm check in hub's `make_task`, this looks straightforward, but may lack some builder's information

fixes: #2757
2021-08-16 17:55:26 +00:00
Ken Dreyer
4878f50fa7 cli: clarify that download-logs operates on tasks 2021-08-16 13:51:01 +02:00
Yu Ming Zhu
56dfae8b4e fix test_delay_times
relates: #2978
2021-08-12 03:35:06 +08:00
Mike McLean
6af614b71b avoid masking hub errors, avoid duplicate check 2021-07-29 08:22:10 -04:00
Mike McLean
d227f0f626 fix unit tests, use error() 2021-07-28 15:22:37 -04:00
Jana Cupova
fb8cfc5678 Add delete-rpm-sig CLI and deleteRPMSig hub call
Fixes: https://pagure.io/koji/issue/2665
2021-07-21 13:43:09 +02:00
Jana Cupova
e689602be5 Add btype to protonmsg
Fixes: https://pagure.io/koji/issue/1217
2021-07-20 10:36:53 +02:00
Jana Cupova
bc2a51350d Enable/disable channel
Fixes: https://pagure.io/koji/issue/1851
2021-07-20 10:33:50 +02:00
Jana Cupova
88b4f7fa2d Increase coverage of CLI unit tests 2021-07-19 14:04:15 +02:00
Jana Cupova
9682a2840c Remove unnecessary line from unlock-tag CLI
Fixes: https://pagure.io/koji/issue/2940
2021-07-19 09:17:30 +02:00
Jana Cupova
31f0db591a dist-repo takes inherited arch when arch is not set
Fixes: https://pagure.io/koji/issue/2805
2021-06-29 14:45:36 +02:00
Jana Cupova
aec9fba121 Add CLI related to channels + add comments to channels
Fixes: https://pagure.io/koji/issue/1711
Fixes: https://pagure.io/koji/issue/1849
2021-06-29 14:44:47 +02:00
Yu Ming Zhu
11d88ee709 fix test by using datetime.timezone instead of psycopg2.tz
according to https://www.psycopg.org/docs/tz.html

fixes: #2926
2021-06-23 10:04:59 +00:00
Tomas Kopecek
c587eb81bf Fix tests on centos 8
Fixes: https://pagure.io/koji/issue/2924
2021-06-22 13:17:10 +02:00
Yu Ming Zhu
bf3ee393ce [policy] use "name" in result of lookup_name for CGs
fixes: #2915
2021-06-22 11:54:16 +02:00
Jana Cupova
12481d43d3 listBuilds returns empty list, not error when not existing
Fixes: https://pagure.io/koji/issue/1209
2021-06-22 11:53:43 +02:00
Tomas Kopecek
3518bc245c additional import for test for some OS versions 2021-06-21 10:36:31 +02:00
Brendan Reilly
0f9a77c0e3 Add noverifyssl option to oz image builds 2021-06-17 15:46:11 +02:00
Jana Cupova
849fd0f800 Fix download-build unit test 2021-06-14 08:21:39 +02:00
Jana Cupova
c4a2f01184 listBuilds accept also package name and user name
Fixes: https://pagure.io/koji/issue/1209
2021-06-08 16:01:42 +02:00
Jana Cupova
51e073f4a4 CLI Download-build check non exist sigkey
Fixes: https://pagure.io/koji/issue/2719
2021-06-08 15:58:47 +02:00
Jana Cupova
d45158ae97 Remove jump/stops options from readFullInheritance
Fixes: https://pagure.io/koji/issue/2656
2021-06-08 15:52:05 +02:00
Jana Cupova
5e09db79c7 New CLI command userinfo
Fixes: https://pagure.io/koji/issue/2836
2021-06-08 15:50:44 +02:00
Tomas Kopecek
61f85acde8 basic test 2021-06-03 15:23:56 +02:00
mprahl
cd1b928a5f Add the ability to specify custom metadata on an RPM build
This adds the `--custom-user-metadata` option to the
CLI `build` command. This is then stored under the
"extra.custom_user_metadata" field on the resulting build.

Signed-off-by: mprahl <mprahl@redhat.com>
2021-06-02 15:48:51 +02:00
Jana Cupova
9541c2a173 importlib instead of imp
Fixes: https://pagure.io/koji/issue/2822
2021-06-02 11:19:33 +02:00
Tomas Kopecek
15c115e71e hub: policy test buildtag_inheritance
Fixes: https://pagure.io/koji/issue/2870
2021-05-24 10:38:01 +02:00
Jana Cupova
8ecfc53119 Unify error messages related to hosts and users
Fixes: https://pagure.io/koji/issue/2858
2021-05-18 10:23:15 +02:00
Jana Cupova
5e861978c6 Check when list of hosts is empty.
Fixes: https://pagure.io/koji/issue/2497
2021-05-12 16:33:23 +02:00
Mike McLean
4b55b62355 fix unit tests 2021-05-10 09:51:03 +02:00
Jana Cupova
56a2d86034 Consistent wait/nowait in all related functions
Fixes: https://pagure.io/koji/issue/2522
2021-05-10 09:17:26 +02:00
Jana Cupova
bef3eff0aa Add squashfs-only and compress-arg options to livemedia
Fixes: https://pagure.io/koji/issue/2476
2021-05-10 09:12:27 +02:00
Jana Cupova
de008b5f27 Add kerberos debug message
Fixes: https://pagure.io/koji/issue/2063
2021-05-03 13:41:35 +02:00
Tomas Kopecek
c732f49ac8 fix tests 2021-04-26 14:43:20 +02:00
Tomas Kopecek
ef3e2cd04b lib: use parse_task_params for taskLabel
Fixes: https://pagure.io/koji/issue/2519
2021-04-26 14:43:20 +02:00
Tomas Kopecek
edaefb865b fix tests for changed helpstring
Related: https://pagure.io/koji/issue/2687
2021-04-22 10:17:39 +02:00
Tomas Kopecek
897b7fe81a more informative test string 2021-04-22 09:58:08 +02:00
Tomas Kopecek
fdf64d0a8d cli: list-api method
Limit output to given method

Fixes: https://pagure.io/koji/issue/2687
2021-04-22 09:58:08 +02:00
Tomas Kopecek
a643ab7236 fix tests for new option 2021-04-19 15:15:53 +02:00
Jana Cupova
6a2c6e7586 Repo info with task id
Fixes: https://pagure.io/koji/issue/888
2021-04-19 15:15:10 +02:00
Jana Cupova
508b7aa8cd unify warn messages
Fixes: https://pagure.io/koji/issue/2795
2021-04-19 15:14:28 +02:00
Tomas Kopecek
855bc89ca3 cli: multicalls for write-signed-rpm
Fixes: https://pagure.io/koji/issue/2807
2021-04-19 15:12:22 +02:00
Jana Cupova
3d33e2e628 api: getVolume with strict
Fixes: https://pagure.io/koji/issue/1592
2021-04-19 15:11:41 +02:00
Jana Cupova
0c6f43a9a8 cli: mock-config check arch
Fixes: https://pagure.io/koji/issue/2640
2021-04-19 15:11:03 +02:00
Jana Cupova
8b1fbc45be cli: list-builds sort-key warning
Fixes: https://pagure.io/koji/issue/2587
Fixes: https://pagure.io/koji/issue/2588
2021-04-19 15:10:24 +02:00
Alex Iribarren
41d5414245 Don't encode already encoded entities 2021-04-19 15:09:36 +02:00
Alex Iribarren
1c7f83acf6 Escape single and double quotes as well, plus add test 2021-04-19 15:09:36 +02:00
Alex Iribarren
a233a0ca72 Show VCS and DistURL tags as links when appropriate 2021-04-19 15:09:36 +02:00