Commit Graph

98 Commits

Author SHA1 Message Date
Ralph Bean
e470b4f0da Bring back a main entrypoint for ridad.py. 2016-07-13 14:39:46 -04:00
Ralph Bean
e644f0b9df Some structure for event handling in ridad.py. 2016-07-13 14:39:23 -04:00
Ralph Bean
12a9f6d7db Give the Database a context manager interface. 2016-07-13 14:39:00 -04:00
Ralph Bean
bd30153feb Move ridad into an importable location and validate module state strings. 2016-07-13 14:03:17 -04:00
Ralph Bean
b5bd9d4cb1 No need for the extra loop here. 2016-07-13 12:56:29 -04:00
Ralph Bean
5563886c07 basic logging for ridad. 2016-07-13 12:56:19 -04:00
Ralph Bean
80cd8c3fad Get things working on py2 as well as py3. 2016-07-13 11:25:02 -04:00
Petr Šabata
594555ae7a Merge #14 Small py3 fix. 2016-07-13 15:00:37 +00:00
Lubos Kocman
75258ff53e Make test-buildroot.py executable
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-07-13 10:31:49 +02:00
Lubos Kocman
9eb5c25e25 Add rida/pdc.py - A rida related product definition center calls
* renamed and split config.pdc to config.pdc_url, config.pdc_insecure, config.pdc_develop
* test-pdc.py contains example usage

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-07-13 10:31:13 +02:00
Ralph Bean
1dc0624329 Small py3 fix. 2016-07-12 10:19:23 -04:00
Ralph Bean
907556ddb4 Break the ssl stuff out into a function and validate that the files are present. 2016-07-12 10:17:56 -04:00
Petr Šabata
f286582e3e Revert "add python3-fedmsg-core to requirements file"
This is a list of PyPI packages for virtualenv-based development.

This reverts commit 2aad1007a9.
2016-07-12 14:01:24 +02:00
Karsten Hopp
2aad1007a9 add python3-fedmsg-core to requirements file 2016-07-12 13:53:51 +02:00
Petr Šabata
ab7b65d6a5 Add the database and key files to .gitignore
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 18:32:48 +02:00
Petr Šabata
fb231cd384 SCM cleanup
Removing the Fedora-centric functions; we won't need those here.
Also dropping the GIT+SSH scheme; rida won't have SSH access to
pretty much anywhere. Also removing the is_scm_url() method; we
already perform similar check in __init__.

Removing the koji copyright notice; all of the code is our own now.

I've also changed to documentation so that apidoc can parse it.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 18:18:50 +02:00
Petr Šabata
3566271601 Add polling_interval to config
This will be used by ridad.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 18:18:10 +02:00
Petr Šabata
5f56a7c95f Make submit-build.sh a bit more user-friendly
By adding some line breaks.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 18:17:16 +02:00
Petr Šabata
bb814d3d55 rida.py cleanup
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 14:45:40 +02:00
Petr Šabata
d7b69fcece Check if all the submitted components are available
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 14:36:39 +02:00
Petr Šabata
851d12197b Add is_available() method to SCM, make _run() a static method
And add checks _run() checks to checkout().

Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 14:35:47 +02:00
Petr Šabata
e378f03c9e Change the default configuration to use production RPM repos
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-09 13:44:10 +02:00
Petr Šabata
3f9ebea700 First bit of the input validation
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 17:30:42 +02:00
Petr Šabata
0904ae6478 Add the get_latest() method
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 17:29:46 +02:00
Petr Šabata
121d7268e8 Cleanup
Add our license to scm.py, add encoding declaration, remove the obsolete
validation.py file.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 14:36:30 +02:00
Petr Šabata
cb68402c48 Merge #10 builder.py: Add Builder, GenericBuilder, KojiModuleBuilder classes 2016-07-08 12:32:34 +00:00
Petr Šabata
2b62d67387 Check whether the module already exists in the database
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 14:29:42 +02:00
Petr Šabata
2ff0c163d3 Make git calls quiet
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 14:20:14 +02:00
Petr Šabata
a45f1888a8 Attempt to fetch the modulemd file
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 14:11:39 +02:00
Petr Šabata
18006ed9b1 createdb.py should use python3
So we don't fail on importing configparser in rida.config.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 14:10:48 +02:00
Petr Šabata
3cc438b379 Extend the SCM code
Parse the scmurls, understand the git hash parts, make the checkout()
method actually check out the given hash, add various properties, make
allowed_scm URLs optional, and drop the common repo code.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 13:46:34 +02:00
Petr Šabata
4da929ac93 Read raw data and add a submit-build.sh test script
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 12:32:28 +02:00
Jan Kaluza
4b91b519d2 Merge branch 'master' of ssh://pagure.io/fm-orchestrator 2016-07-08 10:48:06 +02:00
Jan Kaluza
3c865497bf Use log_backend to choose from 'console', 'file' or 'journal' logging backends. 2016-07-08 10:46:59 +02:00
Lubos Kocman
74703cce82 Add koji and kobo requirements
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-07-08 10:18:19 +02:00
Petr Šabata
fc91ed08dc Sort imports, remove obsolete TODOs
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-08 10:15:21 +02:00
Lubos Kocman
f39be75bd8 Add example test-buildroot.py
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-07-08 07:59:35 +00:00
Lubos Kocman
a0e33c1649 Add Builder, GenericBuilder, KojiBuilder classes
* change config to reflect koji_config path and koji_profile

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-07-08 07:58:15 +00:00
Jan Kaluza
6314354fd4 Use built-in 'logging' module for logging. Add Logger.init_logging function to initialize logging according to config file. 2016-07-08 07:28:25 +02:00
Petr Šabata
cf44ccc360 Merge #9 add git functions 2016-07-07 15:29:57 +00:00
Petr Šabata
d51b7809c7 Merge branch 'master' of ssh://pagure.io/fm-orchestrator 2016-07-07 16:33:01 +02:00
Petr Šabata
204920791d Add pyOpenSSL to requirements.txt
Signed-off-by: Petr Šabata <contyk@redhat.com>
2016-07-07 16:32:02 +02:00
Jan Kaluza
fbfdf1a561 Fix type in 'ClientCertRequestHander' 2016-07-07 15:20:09 +02:00
Jan Kaluza
dd71a5a496 Add 'generate_localhost_cert.sh' script to generate localhost server.crt and server.key for testing 2016-07-07 14:43:04 +02:00
Jan Kaluza
36faac7040 Add simple auth based on the client certificate and pkgdb API. 2016-07-07 14:35:47 +02:00
Karsten Hopp
d30d501657 only a few routines remain from the original koji sources. change comment 2016-07-07 14:01:44 +02:00
Karsten Hopp
8494e696bc add simple retry mechanism 2016-07-06 14:23:20 +02:00
Karsten Hopp
d033c32113 add function to check it a giturl exists in dist-git 2016-07-05 17:23:07 +02:00
Karsten Hopp
f3c7eac837 add a function that takes a string with a dist-git url as parameter and returns a cgit url 2016-07-05 14:09:51 +02:00
Karsten Hopp
740a2f576e no need to set an environment, use execvp 2016-07-05 13:36:02 +02:00