Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Trigger remote run on Open Build Service without changing _service file

I like to use _service files on the OpenSUSE Open Build Service. I tend to have a very simple service file that pulls the orig.tar.gz (for dpkg) and .dsc files from git scm and those files then those files' presence indicate to the build server what to do next which is build the dpkg. Buried in the man page for osc is documentation for how to trigger a service run from the command line. When my service file points to a dev branch (see below example), the service file doesn't need to be updated at all. So I would normally have to go to the webpage and select the "trigger services" button. Screenshot of Open Build Service webpage with hand-drawn circle
indicating the "Trigger Services"
button But with the following commands, I don't need to bother logging in to the webpage:

cd ~/dev/osc/home\:bgstack15/freeipa-helper
osc service remoterun

Why this is so obscure, I don't know.

Example _service file

<services>
   <service name="tar_scm">
      <param name="scm">git</param>
      <param name="url">https://gitlab.com/bgstack15/freeipa-helper.git</param>
      <param name="subdir">debian</param>
      <param name="filename">debian</param>
      <param name="revision"> **dev** </param>
      <param name="version">_none_</param>
   </service>
   <service name="recompress">
      <param name="file">*.tar</param>
      <param name="compression">xz</param>
   </service>
   <service name="tar_scm">
      <param name="scm">git</param>
      <param name="url">https://gitlab.com/bgstack15/freeipa-helper.git</param>
      <param name="revision">dev</param>
      <param name="version">_none_</param>
   </service>
   <service name="recompress">
      <param name="file">*.tar</param>
      <param name="compression">gz</param>
   </service>
   <service name="extract_file">
      <param name="archive">*.tar.xz</param>
      <param name="files">*/*.dsc</param>
   </service>
</services>

Comments