Re: Python client - new build from SPEC file

2018-12-05 Thread Jakub Kadlcik
Hello Petr,

> I want to create a python script for making the release process more
comfortable (create tag in git repository, updating my spec file and
hopefully upload the file to the COPR).

Just to make sure, that you are not reinventing the wheel by mistake. Do
you know tito [1] and rpkg [2] projects? They do exactly what you are
describing, so if you never heard of them, you should definitely check them
;-)

> My code is as simple as this:

I tried your code and it works for me. Isn't somehow possible, that you
indeed have a wrong API token? The create_from_config_file() function by
default uses the ~/.config/copr file. Please make sure that it exists, has
only one [copr-cli] section and it looks like this

[copr-cli]
login = mysecretlogin
username = frostyx
token = mysecrettoken
copr_url = https://copr.fedorainfracloud.org
# expiration date: 2019-05-04

Please check the expiration date of your token and also that it is equal to
https://copr.fedorainfracloud.org/api/ .

[1] https://github.com/dgoodwin/tito/
[2] https://pagure.io/rpkg-util


Jakub

On Tue, Dec 4, 2018 at 10:08 PM Petr Stefan  wrote:

> Hi,
>
> I'm using COPR for building couple of projects for Fedora and CentOS. Now
> I want to create a python script for making the release process more
> comfortable (create tag in git repository, updating my spec file and
> hopefully upload the file to the COPR). I've found python-copr library and
> it works fine when I want for example to get list of existing builds.
> However, creating a new build fails with CoprRequestException (Login
> invalid/expired. Please visit https://copr.fedorainfracloud.org/api to
> get or renew your API token.). But I guess my token is ok, because it's
> freshly generated and works with other endpoins.
>
> My code is as simple as this:
> --
> from copr.v3 import BuildProxy
> build_proxy = BuildProxy.create_from_config_file()
> result = build_proxy.create_from_file("user", "project",
> "spec/file/path.spec")
> --
>
> Is there any solution to my problem? Thanks,
> /semai
> ___
> copr-devel mailing list -- copr-devel@lists.fedorahosted.org
> To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org
>
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org


Planned Copr outage 2018-12-06

2018-12-05 Thread Michal Novotny
Hello,

there will be an outage tomorrow starting at 11am UTC and last
approximatelly four hours. Copr servers will be upgraded from f27 to f28.

More details are here: https://pagure.io/fedora-infrastructure/issue/7422

Best regards!
Copr team
___
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org