Skip to main content
5-Regular Member
September 6, 2018

Ask the Expert: How can I use Git to achieve continuous integration with ThingWorx?

  • September 6, 2018
  • 4 replies
  • 23043 views

Disclaimer: Please note that, while the ThingWorx Git Backup Extension is a very useful tool, it is not a PTC product, nor is it supported by PTC.

 

Hi ThingWorx users,

 

Trying to manage your ThingWorx application artifacts in a CI process? Wondering who changed that line of code in your Thing Service? Trying to see what your Mashup looked like last release? Time to Git excited! Introducing the Git Backup Extension, an open-source tool available here to offer a stronger integration with the Git source repository. This Git feature can push or pull code and artifacts (like entities, data exports or extension dependencies) to your Git repository.

 

Here are some highlights of how this works within ThingWorx:

 

First, configure your Git repo to work with ThingWorx by creating a Git Backup Thing. Then, simply open your new Thing, navigate to the Configuration editor and enter information like your Git URL, your Git username and password, your repo and branch names, etc. See example below.

imageConfiguring your Git repoWith this configuration in place, you can now use the Home Mashup of this new Git thing to browse the repository and pull down contents to your local ThingWorx instance. For new projects, you can also push new entities to the repo as you work on your application.

 

As you and your team are working, you’ll want to see the differences of the files you are editing and working on collaboratively. The Git extension feature makes this easy. Just like you can see diffs clearly delineated for a file with your Git client, you can see the same with this Git integration in ThingWorx. Similar to the git status command, the Git ThingWorx extension will show you the list of files you have changed that are available to push, as well as their diffs. See an example below.

imageChecking the Git status

While working, if you want to switch branches or pull down a new project, you can check out a specific version and see all commits available on that branch (see below).

imageChecking out a specific commit

Want to learn more or try it for yourself? Find the open-source Git Backup Extension here and check out the Git Backup Extension User Guide for guidance.

 

Stay connected,

Kaya

 

P.S. What do you think? Comment your thoughts below!

4 replies

7-Bedrock
September 10, 2018

Great article!

14-Alexandrite
September 25, 2018

Hi Kaya!

 

Do you know if an equivalent extension exists, providing configuration management integration with SVN (Apache Subversion)?

SVN is still often the default configuration management system on a lot of projects.

Thanks,

Sébastien

Kaya5-Regular MemberAuthor
5-Regular Member
September 25, 2018

Hi Sébastien,

 

Thanks for reaching out. Currently, we do not have plans for SVN for the Extension. Although, as you may already know, SVN can be used with ThingWorx through the "Export to Source Control" feature of our entities/application constructs.

 

Hey users, anyone else want SVN? Comment here!

 

-Kaya

14-Alexandrite
September 25, 2018

Thanks Kaya.

The export entities for Source Control does not provide an easy "thing by thing" handling (checkout/commit) like the Git extension.

Regards,

Sébastien

1-Visitor
November 21, 2018

Hi,

I have installed this extension and configured.

I am not able to see any repository on mashup page .

 

I am able to use all git commands from repository created into storage, but only tis it is not getting displayed in mashup. Find attached screen shot for reference.

 

Let me know if anyone has faced this issue.

 

Thanks in advance,

Vishwas

19-Tanzanite
November 21, 2018

Vishwas, can you share the values from the Configuration page from that Git thing that was created?

Also, can you share if the Thing has a ThingShape attached in the General Information page?

1-Visitor
November 21, 2018

imageGitbackup ThingimageHi,

Please find attached screen shots for same.

 

1-Visitor
November 20, 2019

Hello

 

Is the Git backup extension still available? I can't find it on the Marketplace. And is it compatible with Thingworx 8.5?

19-Tanzanite
November 22, 2019
Hi. The extension is hosted in the following GitHub repository, downloadable at the release section:
https://github.com/vrosu/thingworx-gitbackup-extension
You can also get access to its source code there.
19-Tanzanite
January 13, 2020

Version 3.0.0 was released:

-it was tested against ThingWorx version 8.5.x

-removes the lastModifiedDate to allow easier to understand commits

-allows developers to commit using their own Commit Name and Email (persistence per user, via UserExtensions ThingShape)

-documentation updated