#27 setup systemd staging repo
Closed 2 years ago by dcavalca. Opened 3 years ago by dcavalca.

I created https://pagure.io/centos-sig-hyperscale/systemd to use as a repo to stage systemd patches for the SIG backport. FB has an internal repo we use for this already, and we'd like to move this work to a public one to ease collaboration.

I'd like the "main" branch in there to be automatically kept in sync with the systemd repo on github. I tried setting it up as a "mirror" repo, but that deletes all extra branches, which won't work here. I can write a cronjob to keep it up to date leveraging the deploy keys, but that needs to run somewhere. I can put it on FB infra for now, but long term it's probably best to move it onto CentOS and/or Fedora infra so others can manage it if needed.


We should see if @pingou could help us get something running somewhere as a scheduled job.

Ah yes, if there's some infra for scheduled jobs already that would be perfect for this.

Metadata Update from @dcavalca:
- Issue tagged with: meeting

3 years ago

We should see if @pingou could help us get something running somewhere as a scheduled job.

toddlers? https://pagure.io/fedora-infra/toddlers :)

@pingou I don't see a way of using toddlers for this without embedding the deploy SSH key for the repo in the script, which seems suboptimal. It also wasn't clear to me how to have a toddlers plugin run on a schedule. I assume it can be done by keying off some specific periodic message on the bug, but I couldn't find a list of what to look for.

I've added a deploy key to the repo config, and I'm setting up a batch job on my end to sync it periodically for now.

I assume it can be done by keying off some specific periodic message on the bug, but I couldn't find a list of what to look for.

Yes, we have cron jobs on the toddlers openshift project that send a trigger message at a given time (the message are sent via the playground script), crons can be found at: https://pagure.io/fedora-infra/ansible/blob/main/f/roles/openshift-apps/toddlers/templates/cron_playtime.yml

Ok I have a batch job running every day at 10am PST to update the main branch on this using the deploy key. Happy to move this to toddlers or something else eventually (and if someone wants to take point on that, please feel free to), but this will do for now.

For reference, this is pretty much all the script is doing:

echo 'Setting up environment'
# fetch deploy key from secrets store, setup env variables for proxy and stuff
echo 'Cloning upstream repo'
git clone https://github.com/systemd/systemd.git
echo 'Adding Hyperscale remote'
(cd systemd && git remote add hyperscale ssh://git@pagure.io/centos-sig-hyperscale/systemd.git)
echo 'Pushing changes to Hyperscale remote'
(cd systemd && git push --tags hyperscale HEAD:main)
echo 'Cleaning up'
rm -rf systemd

Batch job seems to be working well, and the releng scripts are in https://pagure.io/centos-sig-hyperscale/systemd-releng too. Gonna call this done for now.

Metadata Update from @dcavalca:
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata