Let github.com trigger your source update

OBS as running on build.opensuse.org is supporting now to execute source services via authentification tokens. That means you do not use your secret login credentials for this kind of operations which makes it easy to hook into other services like github.com.

Please find details about source services and authentification tokens in the OBS reference guide. Or learn about this example. You need also latest osc version 0.142 to use this.

Create a new package container and check it out with osc. Afterwards create the source service using osc with this command: osc add git://github.com/openSUSE/obs-build.git and checkin the generated _service file. You need also to provide a spec file.

Now create a token for this package via osc token --create YOUR_PROJECT YOUR_PACKAGE. The command will return the token id or list all your tokens via osc token. The execution can be tested via osc token --trigger YOUR_TOKEN.

If you want to update this package always when doing a git push you can register this token on github. Go to your repository, find the Settings and the Service Hooks button. One of the many services is the Obs service. Paste the token id to the token field, check on the Active button and click on update. You do not need to fill out the other three fields if you are using the opensuse obs instance and registered the package when creating the token as described above.

Each git push will lead to a service update now. Your username will appear in the osc log source history.

« OBS Mailing List Summary, Week 46