Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Automated build when pyplanet updates #4

Open
Harha opened this issue Mar 26, 2021 · 9 comments
Open

Automated build when pyplanet updates #4

Harha opened this issue Mar 26, 2021 · 9 comments

Comments

@Harha
Copy link
Owner

Harha commented Mar 26, 2021

We don't have a script for starting a new docker image build when pyplanet has been updated on pip.

I can add this check to my server as a cron job, like we already have a script for automated build trigger when TM2020 server latest zip is updated.

@ineentho
Copy link
Collaborator

ineentho commented Mar 26, 2021

Ok, I see. Another way of solving it could be to use something like renovate or dependabot to check for dependency updates and automatically create a commit when something is updated.

I'm using this technique on a few of my projects, for example: https://gitlab.henrik.ninja/kubetools/pgcli/-/commits/master. When a new version is available, a merge request is created: https://gitlab.henrik.ninja/kubetools/pgcli/-/merge_requests/61. A basic test is run, and if it succeeds it is automatically merged.

That may of course increase the complexity of the project a bit, but it offers a nice overview of why a new version was released.

If you are interested I could try to set something up for this project using github actions + renovate

@Harha
Copy link
Owner Author

Harha commented Mar 26, 2021

Oh, well that would be way better I imagine! Feel free to set it up, I'll add you as a collaborator to this repository. :-) I'm personally more familiar with gitlab and mainly gitlab-ci, I don't know much about github and these bots but that seems nice indeed.

@ineentho
Copy link
Collaborator

Thanks for the invitation! I'll give it a try during the weekend. I'm also mostly used to gitlab/gitlab-ci, but given that this is hosted on github it's probably easier to use actions :)

@Harha
Copy link
Owner Author

Harha commented Mar 26, 2021

Yeah, thanks in advance! I'll manually trigger a rebuild for the time being.

@ineentho
Copy link
Collaborator

I gave it a (quick) try, but it is complicated a bit by the fact that the trackmania server isn't available in any package registry, nor is it even easy to check the current version without downloading the whole zip.

We can keep this issue open if you want to, but it is more work than initially expected, so i may get to it later (or maybe never :()

@Harha
Copy link
Owner Author

Harha commented Mar 29, 2021

Ah I see. Well I can look into it too whenever I have energy and time. I just started on a new job so maybe next weekend. :P

If the bots and whatnot are not flexible enough to handle the TM 2020 server case then we might have to leave that part to my server's cron job and use a bot just for the pyplanet image. But we'll see...

@dgalli1
Copy link

dgalli1 commented Jun 6, 2021

I gave it a (quick) try, but it is complicated a bit by the fact that the trackmania server isn't available in any package registry, nor is it even easy to check the current version without downloading the whole zip.

We can keep this issue open if you want to, but it is more work than initially expected, so i may get to it later (or maybe never :()

If you guys ever try this again its possible to check for updates on the trackmania server by only downloading the headers.
The header Last-modified seems to change whenever theirs an update.
curl -s -I http://files.v04.maniaplanet.com/server/TrackmaniaServer_Latest.zip

@Harha
Copy link
Owner Author

Harha commented Jun 7, 2021

I gave it a (quick) try, but it is complicated a bit by the fact that the trackmania server isn't available in any package registry, nor is it even easy to check the current version without downloading the whole zip.
We can keep this issue open if you want to, but it is more work than initially expected, so i may get to it later (or maybe never :()

If you guys ever try this again its possible to check for updates on the trackmania server by only downloading the headers.
The header Last-modified seems to change whenever theirs an update.
curl -s -I http://files.v04.maniaplanet.com/server/TrackmaniaServer_Latest.zip

Good point. That's actually what my personal server does periodically with a cron-job and if it notices a change in the timestamp then it triggers a rebuild of this pyplanet image on dockerhub.

I overlooked that before in this thread even though I knew the answer. Though I'm not sure if those bots @ineentho was trying to configure stretch into this use-case.

@ineentho
Copy link
Collaborator

ineentho commented Jun 7, 2021

That's good to know. In theory it would be possible to have it as two steps: A bot that polls for updates and pushes a new tag to a mostly blank git repository, and then having renovate pick up the new tags.

It should be very doable, but it still feels a little bit overcomplicated

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants