FreeCAD-Bundle icon indicating copy to clipboard operation
FreeCAD-Bundle copied to clipboard

TravisCI webhook to trigger a remote script (in this case to update the wiki)

Open luzpaz opened this issue 7 years ago • 6 comments

How do we setup a post-build TravisCI webhook that triggers a remote script to update the wiki {{Template:Development-Version}} template (and any future templates) that can be used to keep the link to the most up to date development version synchronized?

The script is already created. The only missing portions of the workflow is listening for the webhook and the webhook script on TravisCI itself.

CC @kkremitzki

luzpaz avatar Nov 20 '18 22:11 luzpaz

This is on the right direction. Can we get secure credentials for the wiki into Travis? If so, we should be able to push the correct version to the wiki. If we can add something to the "after_success:" block, it would be accurate and probably the most resilient.

sgrogan avatar Nov 20 '18 22:11 sgrogan

Can we get secure credentials for the wiki into Travis?

@sgrogan didn't occur to me that we could do this. Would that mean installing the pywikibot and running it directly from travis? Is that what you mean?

That's another order of complexity that I'm not sure about. Right now the way I'm thinking is: travisci successful appimage build triggers an endpoint that triggers the script on a remote server that logs in to the wiki (under my account) and posts the newest revision number to https://www.freecadweb.org/wiki/Template:Development-Version

luzpaz avatar Nov 20 '18 23:11 luzpaz

that triggers the script on a remote server

We could use the Frankfurt server for this.

kkremitzki avatar Nov 20 '18 23:11 kkremitzki

@kkremitzki perhaps i could get shell access to it? It should be straight-forward for me to setup the pywikibot stuff on it

luzpaz avatar Nov 20 '18 23:11 luzpaz

@luzpaz , yes this is what I'm suggesting. No need for an additional webhook or another server. Update the wiki link at the same time the build is deployed. Maybe we need a Travis-CI wiki account, we already pass github credentials. This should also work for the OSX builds as well as the two different AppImage builds.

sgrogan avatar Nov 21 '18 20:11 sgrogan

Giving up on this feature. Closing

luzpaz avatar Jul 11 '22 13:07 luzpaz