Mailinglist Archive: opensuse-factory (266 mails)

< Previous Next >
Re: [opensuse-factory] Rabbitmq OBS build success event client - Easy package testing - rabbit_obs_client
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Thu, 14 May 2020 11:55:22 +0200
  • Message-id: <20200514095522.4vevasfiw3qdpj32@linux>
On 2020-05-14 09:10:33 +0200, Thomas Renninger wrote:
Am Donnerstag, 14. Mai 2020, 06:18:08 CEST schrieb Bernhard M. Wiedemann:
On 13/05/2020 20.14, Dan Čermák wrote:
Does your rabbit listener react on successful builds or publish events?
Depending on the load on the publisher, there is a non-negligible time
difference between those two events. In the worst case you'll test
your previous build, because the new one hasn't hit the repos yet.

https://github.com/watologo1/rabbit_obs_client/blob/master/rabbit_obs_client
.py#L63 says it listens on build-success, but then it does not need a
publish, because it uses osc getbinaries

Correct, very well reviewed, thanks!

so it will also work with repos that have publishing disabled

Yes, publishing took sometimes several minutes up to half an hour or longer.
Therefore I went the extra way of:
osc get binaries
One big disadvantage is, that this is the only reason you need a user with osc
credentials (~/.config/osc/oscrc) the rabbit_obs_client systemd daemon can
sudo (or su?) into.

It is also possible to fetch the binaries without an account via the
(unofficial) public route.

- retrieve the binarylist

marcus@linux:~> curl
https://api.opensuse.org/public/build/home:trenn:rabbit_obs_client/openSUSE_Tumbleweed/x86_64/rabbit_obs_client
<binarylist>
<binary filename="_buildenv" size="20112" mtime="1587061857"/>
<binary filename="_statistics" size="949" mtime="1587061857"/>
<binary filename="rabbit_obs_client-1.0+git20200416.6c6ee7d-7.1.noarch.rpm"
size="16960" mtime="1587061857"/>
<binary filename="rabbit_obs_client-1.0+git20200416.6c6ee7d-7.1.src.rpm"
size="25002" mtime="1587061857"/>
<binary filename="rpmlint.log" size="58" mtime="1587061857"/>
</binarylist>
marcus@linux:~>

(it is also possible to filter src.rpms etc.)

- retrieve the binaries (several requests)

curl
https://api.opensuse.org/public/build/home%3Atrenn%3Arabbit_obs_client/openSUSE_Tumbleweed/x86_64/rabbit_obs_client/rabbit_obs_client-1.0%2Bgit20200416.6c6ee7d-7.1.noarch.rpm
\
-o binary.rpm
curl
https://api.opensuse.org/public/build/home%3Atrenn%3Arabbit_obs_client/openSUSE_Tumbleweed/x86_64/rabbit_obs_client/rabbit_obs_client-1.0%2Bgit20200416.6c6ee7d-7.1.src.rpm
\
-o source.rpm

- retrieve the binaries (single request)

curl
'https://api.opensuse.org/public/build/home%3Atrenn%3Arabbit_obs_client/openSUSE_Tumbleweed/x86_64/rabbit_obs_client?view=cpio&binary=rabbit_obs_client-1.0%2Bgit20200416.6c6ee7d-7.1.noarch.rpm&binary=rabbit_obs_client-1.0%2Bgit20200416.6c6ee7d-7.1.src.rpm'
\
-o binaries.cpio


Marcus
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >