Mailinglist Archive: opensuse-buildservice (88 mails)

< Previous Next >
Re: [opensuse-buildservice] obs service github_tarballs
  • From: Victor Pereira <vpereira@xxxxxxx>
  • Date: Tue, 26 Jun 2018 15:13:26 +0200
  • Message-id: <20180626151326.13546ee0@kimura>
On Tue, 26 Jun 2018 14:48:25 +0200
Christian <chris@xxxxxxxxxxxxxxxx> wrote:

Am 26.06.2018 um 13:01 schrieb Olaf Hering:
Am Tue, 26 Jun 2018 09:37:50 +0200
schrieb Christian <chris@xxxxxxxxxxxxxxxx>:

rebuild after creating a new 'tag' in github.

github might be able to do a 'osc service rr $prj $pkg', but it
seems that OBS lacks a concept of 'latest reachable tag from
$branch' for the "revision" parameter. At least it is not clear
from /usr/lib/obs/service/tar_scm.service how that should be done.
AFAIUnderstand is tar_scm useful for 'commit' based rebuilds ... yeah
that is nice, but not wanted here.

That is why I thought github_tarballs service could be a solution, but
still not aware how to get 'refs/tags/latest' ...



For the time being create the _service on the fly. If
"latest_git_tag" changes a new _service will be commited.

... how to get 'latest_git_tag' ...


<services>
<service name="obs_scm">
<param name="filename">${pkg}</param>
<param name="revision">${latest_git_tag}</param>
<param name="scm">git</param>
<param name="submodules">disable</param>
<param name="url">https://gitlab.com/${prj}/${pkg}.git</param>
<param name='versionformat'>%ci.%h</param>
</service>
<service mode="buildtime" name="tar">
<param name="obsinfo">${pkg}.obsinfo</param>
</service>
<service mode="buildtime" name="set_version">
<param name="basename">${pkg}</param>
</service>
</services>


Olaf


this looks nice, but looks like this must be done somehow manual each
time you create a tag on github you go to obs and update the package
manually ... or did I get something wrong ...

I still have no idea what obs is able to do ... probably cause of very
less documentation :-(


Reading the source code
(https://github.com/openSUSE/obs-service-github_tarballs/blob/master/github_tarballs)
,
I think it's not supported right now, but it could be extended to do it
using github API as described here:
https://developer.github.com/v3/repos/releases/#get-the-latest-release


--
Victor Pereira

SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB
21284 (AG Nürnberg)

Maxfeldstraße 5

90409 Nürnberg

< Previous Next >
Follow Ups