Skip to main content
Question

Automate/Schedule Push from FME Cloud/Server to Remote Git Repository

  • November 27, 2019
  • 5 replies
  • 184 views

l_d
Participant
Forum|alt.badge.img+1
We have successfully linked the FME Server git repository to our remote repository in Azure. This is great, since our commit history will now persist between backup/restores when upgrading.

 

However it seems the only way to trigger a push to the remote repository is to manually navigate to the 'Push to Remote' button in 'System Configuration'.

 

I can't see anything in Automations or in the FME Server API documentation which would allow us to automate this process. Has anyone found an inventive way to schedule the 'Push to Remote' process? It doesn't necessarily need to trigger with every commit, more like once per day.

 

Using FME Server 2019.1 hosted in FME Cloud.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

nampreetatsafe
Safer
Forum|alt.badge.img+13

Hi @Id, I'm not a FME Server expert, but a fellow Safer mentioned that version control is not exposed as an endpoint in the FME Server REST API.

That said, you can try constructing a POST with HTTPCaller to /fmerest/v3/versioncontrol/remote/push – they will need an fmetoken Authorization Header (e.g. fmetoken token=*************************************** ). However, he hasn't tested this himself.

Feel free to up vote and comment on this existing post in our Ideas Forum, https://knowledge.safe.com/idea/75121/expose-versioning-through-the-fme-server-rest-api.html


runneals
Supporter
Forum|alt.badge.img+28
  • Supporter
  • December 4, 2019

Here's an FME workspace that I made that pushes the latest changes to the local repo, and then pushes it to the remote repo. We have this scheduled to run every night, so even though someone may have modified a workspace and reuploaded it without clicking the button to commit, they get commited anyway and are noted as an automated commit.

MAJOR DISCLAIMER: Since SAFE doesn't officially support the api yet, it isn't technically supported and may break in future versions of FME Server.

 

https://github.com/runneals/GISProjects/blob/master/fme/FME%20Server%20Tools/FME%20Server%20Bulk%20Commit%20for%20Version%20Control.fmw

l_d
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • December 16, 2019

Here's an FME workspace that I made that pushes the latest changes to the local repo, and then pushes it to the remote repo. We have this scheduled to run every night, so even though someone may have modified a workspace and reuploaded it without clicking the button to commit, they get commited anyway and are noted as an automated commit.

MAJOR DISCLAIMER: Since SAFE doesn't officially support the api yet, it isn't technically supported and may break in future versions of FME Server.

 

https://github.com/runneals/GISProjects/blob/master/fme/FME%20Server%20Tools/FME%20Server%20Bulk%20Commit%20for%20Version%20Control.fmw

Thanks, this looks promising. Will this include commit comments/version descriptions in the push to the remote repository?


l_d
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • December 16, 2019

Hi @Id, I'm not a FME Server expert, but a fellow Safer mentioned that version control is not exposed as an endpoint in the FME Server REST API.

That said, you can try constructing a POST with HTTPCaller to /fmerest/v3/versioncontrol/remote/push – they will need an fmetoken Authorization Header (e.g. fmetoken token=*************************************** ). However, he hasn't tested this himself.

Feel free to up vote and comment on this existing post in our Ideas Forum, https://knowledge.safe.com/idea/75121/expose-versioning-through-the-fme-server-rest-api.html

Thanks, this is the call being used in runneals workspace above. I have tested and this is working as needed. Thanks both.


l_d
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • December 16, 2019

Thanks, this is the call being used in runneals workspace above. I have tested and this is working as needed. Thanks both.

For anyone stumbling across this in future, the headers needed are:

 

Content-Type = application/x-www-form-urlencoded

Accept = application/json

Authorization = fmetoken token=YourTokenHere